/* Pia-Tour: Ergänzungen zu pia-tour.css (Begrüßung, Demo "Mail einstufen", Screenshots) */

.brand-logo {
    padding: 8px;
}

.stat b {
    font-size: clamp(36px, 4vw, 52px);
}

/* Screenshots der Mail-Ansichten sind fast quadratisch: Höhe begrenzen */
#mailFrame .clip {
    max-height: 56vh;
    overflow: hidden;
}

/* Schritte mit großem Screenshot: breiter, Screenshot bekommt mehr Platz als der Text */
.inner:has(> .rv-top) {
    max-width: 1520px;
}

.rv-top,
.rv-top--nav {
    grid-template-columns: minmax(320px, .75fr) 1.6fr;
    gap: 48px;
}

.rv-top .frame img,
.nav-shots .frame img {
    max-height: 70vh;
    object-fit: cover;
    object-position: top left;
}

/* =====================================================================
   Fenster im Stil von Windows 11 (paraOffice ist eine Windows-Anwendung)
   ===================================================================== */

.frame {
    border-radius: 8px;
}

.frame-bar {
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    height: 32px;
    padding: 0 0 0 12px;
    background: #F3F3F3;
    border-bottom: 1px solid #E5E5E5;
}

.win-title {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    color: #1F1F1F;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.win-title em {
    color: #5F5F5F;
    font-style: normal;
    font-weight: 400;
}

.win-title em::before {
    content: "·";
    margin-right: 6px;
}

/* paraOffice-Logo: rotes Quadrat vor grauem */
.win-title::before {
    content: "";
    flex: none;
    width: 12px;
    height: 12px;
    border-radius: 2px;
    background: linear-gradient(var(--accent), var(--accent)) 0 0 / 9px 9px no-repeat,
                linear-gradient(#3F3F4A, #3F3F4A) 3px 3px / 9px 9px no-repeat;
}

.win-ctrl {
    display: flex;
    align-self: stretch;
}

.frame-bar .win-ctrl i {
    position: relative;
    width: 44px;
    height: auto;
    border-radius: 0;
    background: transparent;
    transition: background-color .15s;
}

.frame-bar .win-ctrl i::before,
.frame-bar .win-ctrl i::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
}

/* Minimieren */
.frame-bar .win-ctrl i:nth-child(1)::before {
    width: 10px;
    height: 1px;
    background: #1F1F1F;
    transform: translate(-50%, -50%);
}

/* Maximieren */
.frame-bar .win-ctrl i:nth-child(2)::before {
    width: 9px;
    height: 9px;
    border: 1px solid #1F1F1F;
    border-radius: 2px;
    transform: translate(-50%, -50%);
}

/* Schließen */
.frame-bar .win-ctrl i:nth-child(3)::before,
.frame-bar .win-ctrl i:nth-child(3)::after {
    width: 12px;
    height: 1px;
    background: #1F1F1F;
}

.frame-bar .win-ctrl i:nth-child(3)::before { transform: translate(-50%, -50%) rotate(45deg); }
.frame-bar .win-ctrl i:nth-child(3)::after { transform: translate(-50%, -50%) rotate(-45deg); }

.frame:hover .win-ctrl i:nth-child(3) { background: #C42B1C; }
.frame:hover .win-ctrl i:nth-child(3)::before,
.frame:hover .win-ctrl i:nth-child(3)::after { background: #fff; }

.step.dark .frame {
    border-color: rgba(255, 255, 255, .12);
    box-shadow: 0 40px 90px -30px rgba(0, 0, 0, .8), 0 0 70px -20px rgba(122, 197, 212, .35);
}

/* =====================================================================
   Begrüßung
   ===================================================================== */

.inner.hero {
    grid-template-columns: 1fr 1fr;
    max-width: 1120px;
    margin-inline: auto;
}

.step:first-child .glow {
    top: 50%;
    right: auto;
    left: 62%;
    transform: translate(-50%, -50%);
}

.pia-hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}

.pia-bubble {
    position: relative;
    width: 340px;
    max-width: 100%;
    padding: 16px 20px;
    border-radius: 16px;
    background: var(--brand-steel);
    color: var(--brand-grey);
    box-shadow: 0 24px 50px -24px rgba(0, 0, 0, .55);
}

.pia-bubble::after {
    content: "";
    position: absolute;
    left: calc(50% + 2px);
    bottom: -9px;
    width: 18px;
    height: 18px;
    background: var(--brand-steel);
    transform: translateX(-50%) rotate(45deg);
}

.pia-bubble b {
    display: block;
    font-size: 21px;
}

.pia-bubble > span {
    display: block;
    min-height: 2.8em;
    margin-top: 6px;
    color: var(--brand-grey);
    font-size: 16px;
    line-height: 1.4;
}

.pia-figure {
    width: 220px;
    height: 220px;
    overflow: visible;
}

.pia-figure .head-line { stroke: #3F3F4A; }
.pia-figure .fill-face { fill: #fff; }
.pia-figure .ink { fill: #3F3F4A; }
.pia-figure .red { fill: var(--accent); }

.pia-figure .g-square,
.pia-figure .g-head,
.pia-figure .g-antenna,
.pia-figure .eye,
.pia-figure .wink,
.pia-figure .g-body,
.pia-bubble {
    transform-box: fill-box;
    transform-origin: center;
}

.pia-figure .g-antenna,
.pia-figure .g-body {
    transform-origin: 50% 100%;
}

.pia-figure .wink {
    opacity: 0;
}

.pia-figure.play .g-square { animation: pia-sq .55s cubic-bezier(.2, .9, .3, 1.3) .15s both; }
.pia-figure.play .g-head { animation: pia-pop .6s cubic-bezier(.2, .9, .3, 1.4) .35s both; }
.pia-figure.play .g-antenna { animation: pia-pop .4s ease-out .55s both, pia-boing 1s ease-in-out .9s 1; }
.pia-bubble.play { animation: pia-bubble .45s cubic-bezier(.2, .9, .3, 1.3) 1.1s both; }
.pia-figure.play .eye-r { animation: pia-close-eye 2.4s ease-in-out 2.4s 1 both; }
.pia-figure.play .wink { animation: pia-wink 2.4s ease-in-out 2.4s 1 both; }
.pia-figure.play .g-body { animation: pia-tilt 2.4s ease-in-out 2.4s 1; }
.pia-figure.play { animation: pia-float 4s ease-in-out 5s infinite; will-change: transform; }
.pia-figure.play .eye-l { animation: pia-blink 4.5s ease-in-out 6s infinite; }
.pia-figure.play .eye-r.done { animation: pia-blink 4.5s ease-in-out 1.5s infinite; }

@keyframes pia-sq { from { opacity: 0; transform: translate(30px, 10px) rotate(-12deg) scale(.6); } to { opacity: 1; transform: none; } }
@keyframes pia-pop { from { opacity: 0; transform: scale(.4) translateY(30px); } to { opacity: 1; transform: none; } }
@keyframes pia-boing { 0%, 100% { transform: rotate(0); } 20% { transform: rotate(14deg); } 45% { transform: rotate(-10deg); } 70% { transform: rotate(5deg); } }
@keyframes pia-bubble { from { opacity: 0; transform: translateY(10px) scale(.9); } to { opacity: 1; transform: none; } }
@keyframes pia-close-eye { 0%, 8% { transform: scaleY(1); } 16%, 70% { transform: scaleY(.08); } 80%, 100% { transform: scaleY(1); } }
@keyframes pia-wink { 0%, 12% { opacity: 0; } 18%, 68% { opacity: 1; } 76%, 100% { opacity: 0; } }
@keyframes pia-tilt { 0%, 8% { transform: rotate(0); } 20%, 65% { transform: rotate(-5deg); } 85%, 100% { transform: rotate(0); } }
@keyframes pia-blink { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.1); } }
@keyframes pia-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }

.caret {
    display: inline-block;
    width: 2px;
    height: 1em;
    margin-left: 2px;
    background: var(--accent);
    vertical-align: -2px;
    animation: pia-caret 1s steps(1) infinite;
}

@keyframes pia-caret { 50% { opacity: 0; } }

/* =====================================================================
   Demo "Mail einstufen"
   ===================================================================== */

.pia-title {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pia-title img {
    width: 26px;
    height: 26px;
}

.mail-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.mail-pick {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--card);
    color: var(--text);
    text-align: left;
    transition: border-color .2s var(--ease), box-shadow .2s var(--ease), transform .2s var(--ease);
}

.mail-pick:hover {
    transform: translateY(-1px);
    border-color: var(--sky);
}

.mail-pick[aria-selected="true"] {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(237, 28, 36, .12);
}

.mail-pick b {
    font-size: 15px;
}

.mail-pick span {
    color: var(--muted);
    font-size: 14px;
}

.classify {
    min-height: 300px;
}

.classify.ready > * {
    animation: pia-rise .35s var(--ease) both;
}

.classify.ready > *:nth-child(2) { animation-delay: .05s; }
.classify.ready > *:nth-child(4) { animation-delay: .12s; }
.classify.ready > *:nth-child(6) { animation-delay: .19s; }
.classify.ready > *:nth-child(8) { animation-delay: .26s; }

@keyframes pia-rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.cl-thinking {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 18px 0;
    color: var(--muted);
}

.cl-thinking img {
    width: 30px;
    height: 30px;
}

.cl-thinking i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
    animation: pia-dot 1s ease-in-out infinite;
}

.cl-thinking i:nth-of-type(2) { animation-delay: .15s; }
.cl-thinking i:nth-of-type(3) { animation-delay: .3s; }

@keyframes pia-dot { 0%, 100% { opacity: .25; transform: translateY(0); } 50% { opacity: 1; transform: translateY(-3px); } }

.cl-section {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 14px 0 6px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.cl-section::before {
    content: "";
    width: 14px;
    height: 2px;
    background: var(--accent);
}

.cl-box {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--card);
    font-size: 14px;
}

.cl-box > div {
    flex: 1;
    min-width: 0;
}

.cl-box b {
    display: block;
}

.cl-box span {
    color: var(--muted);
}

.cl-muted {
    color: var(--muted);
}

.cl-summary img {
    width: 34px;
    height: 34px;
    flex: none;
}

.cl-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 6px;
}

.cl-tag {
    display: inline-block;
    padding: 2px 9px;
    border-radius: 999px;
    background: var(--ink-3);
    color: var(--text) !important;
    font-size: 12px;
    font-weight: 600;
}

.cl-tag.warn {
    background: rgba(239, 236, 234, .14);
    color: var(--brand-sand) !important;
}

.cl-tag.accent {
    background: var(--blue-bg);
    color: var(--accent) !important;
}

.cl-box .cl-tag {
    margin-top: 4px;
}

.cl-box > .cl-cal {
    width: 44px;
    flex: none;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    text-align: center;
}

.cl-cal small {
    display: block;
    padding: 2px 0;
    background: var(--accent);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
}

.cl-cal b {
    font-size: 18px;
    line-height: 1.5;
}

.cl-btn {
    flex: none;
    padding: 6px 12px;
    border-radius: 8px;
    background: var(--accent);
    color: #fff !important;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
}

.cl-btn--ghost {
    border: 1px solid var(--line);
    background: var(--card);
    color: var(--text) !important;
}

/* =====================================================================
   Allgemeine Recherche: Navigation + Ansicht
   ===================================================================== */

/* Navigation als schwebende Karte über der Ansicht */
.nav-shots {
    position: relative;
    padding: 0 0 40px 70px;
}

.nav-shots .frame:not(.frame--nav) {
    transform: perspective(1600px) rotateY(-6deg);
    transform-origin: left center;
}

.frame--nav {
    position: absolute;
    left: 0;
    top: 24px;
    z-index: 2;
    width: 130px;
    transform: rotate(-3deg);
    box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .85), 0 0 0 1px rgba(255, 255, 255, .1);
}

.nav-shots .frame--nav img {
    max-height: none;
    object-fit: contain;
}

@media (max-width: 1000px) {
    .rv-top,
    .rv-top--nav {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    .nav-shots {
        padding: 0;
    }

    .nav-shots .frame:not(.frame--nav) {
        transform: none;
    }

    .frame--nav {
        display: none;
    }

    .win-title em {
        display: none;
    }

    .pia-hero {
        align-items: center;
    }

    .pia-figure {
        width: 160px;
        height: 160px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .pia-figure.play *,
    .pia-bubble.play,
    .classify.ready > *,
    .cl-thinking i,
    .caret {
        animation: none !important;
    }
}

/* =====================================================================
   Nur in paraOffice: Schließen, "Über Sie", Schluss
   ===================================================================== */

.topbar .buy-mini--ghost {
    margin-left: 8px;
    border: 1px solid currentColor;
    background: transparent;
    color: inherit;
    cursor: pointer;
}

body.on-dark .topbar .buy-mini--ghost {
    background: transparent;
    color: #fff;
}

.navbtn:disabled {
    opacity: .35;
    cursor: default;
}

.profile {
    max-width: 640px;
    margin: 0 auto;
    text-align: center;
}

.profile-pia {
    width: 96px;
    height: 96px;
    margin-bottom: 8px;
}

.profile h2 {
    margin-bottom: 8px;
}

.profile-form {
    display: grid;
    gap: 16px;
    margin-top: 28px;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--ink-2);
    text-align: left;
}

.pf {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.pf > span {
    color: var(--brand-sand);
    font-size: 14px;
    font-weight: 600;
}

.pf input,
.pf select {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--brand-steel);
    border-radius: 10px;
    background: #fff;
    color: var(--brand-grey);
    font: inherit;
    font-size: 16px;
}

.pf input:focus,
.pf select:focus {
    outline: 3px solid rgba(122, 197, 212, .45);
    outline-offset: 1px;
}

.role-tiles {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.role-tile {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    padding: 12px 14px;
    border: 1.5px solid var(--line);
    border-radius: 12px;
    background: var(--ink);
    color: var(--brand-sand);
    text-align: left;
    transition: border-color .2s var(--ease), background .2s var(--ease), transform .2s var(--ease);
}

.role-tile:hover {
    border-color: var(--brand-steel);
    transform: translateY(-2px);
}

.role-tile[aria-checked="true"] {
    border-color: var(--brand-teal-light);
    background: var(--brand-teal);
    color: #fff;
}

.role-tile:focus-visible {
    outline: 3px solid rgba(122, 197, 212, .45);
    outline-offset: 2px;
}

.role-tile b {
    min-width: 0;
    font-size: 15px;
    line-height: 1.3;
    overflow-wrap: anywhere;
}

.role-ico {
    flex: none;
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(122, 197, 212, .16);
    color: var(--brand-teal-light);
}

.role-tile[aria-checked="true"] .role-ico {
    background: rgba(255, 255, 255, .18);
    color: #fff;
}

.role-ico svg {
    width: 20px;
    height: 20px;
}

@media (max-width: 560px) {
    .role-tiles {
        grid-template-columns: minmax(0, 1fr);
    }
}

.profile-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 4px;
}

.profile-note,
.final-hint {
    margin: 0;
    color: var(--soft);
    font-size: 13px;
}

.final-hint {
    margin-top: 22px;
    text-align: center;
}

/* längerer Begrüßungstext als in der Tour */
.hero h1 {
    font-size: clamp(30px, 3.2vw, 50px);
}

.step:nth-child(2) .glow {
    top: 50%;
    right: auto;
    left: 50%;
    opacity: .45;
    transform: translate(-50%, -50%);
}
