/*
 * Q-smart HelpDesk - index (public landing) styles
 * Visual direction: Minimalism & Swiss Style (enterprise / professional tools)
 * Scoped to body.hd-page so no other page is affected.
 * Requires bifra_tokens.css (loaded first) for the design tokens.
 */



body.hd-page {
    font-family: var(--hd-font);

    /* bifra_helpdesk.css pins body{height:100vh}, which clips taller content. */
    height: auto;
    min-height: 100vh;
    background-color: var(--hd-bg);
    color: var(--hd-fg);
    font-size: 16px;
    line-height: 1.6;
}

body.hd-page .hd-skip-link {
    position: absolute;
    left: var(--hd-space-4);
    top: -100px;
    z-index: 1100;
    padding: var(--hd-space-3) var(--hd-space-4);
    background: var(--hd-primary);
    color: #FFFFFF;
    border-radius: var(--hd-radius);
    text-decoration: none;
    transition: top var(--hd-dur) var(--hd-ease);
}
body.hd-page .hd-skip-link:focus {
    top: calc(var(--hd-navbar-h) + 8px);
    outline: 3px solid var(--hd-accent);
    outline-offset: 2px;
}

body.hd-page .hd-main {
    padding-top: var(--hd-space-7);
    padding-bottom: var(--hd-space-7);
}

/* ---------- Page header ---------- */
body.hd-page .hd-header {
    max-width: 60ch;                 /* line-length control */
    margin-bottom: var(--hd-space-6);
}
body.hd-page .hd-title {
    font-size: 1.875rem;
    line-height: 1.25;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--hd-fg);
    margin: 0 0 var(--hd-space-3) 0;
}
body.hd-page .hd-subtitle {
    font-size: 1rem;
    color: var(--hd-muted-fg);
    margin: 0;
}
body.hd-page .hd-rule {
    height: 3px;
    width: 48px;
    background: var(--hd-accent);
    border: 0;
    margin: var(--hd-space-4) 0 0 0;
    opacity: 1;
}

body.hd-page .hd-section-label {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--hd-muted-fg);
    margin: 0 0 var(--hd-space-4) 0;
}

/* ---------- Service card ---------- */
body.hd-page .hd-card {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: var(--hd-space-5);
    background: var(--hd-card);
    border: 1px solid var(--hd-border);
    border-radius: var(--hd-radius);
    transition: border-color var(--hd-dur) var(--hd-ease),
                box-shadow var(--hd-dur) var(--hd-ease),
                transform var(--hd-dur) var(--hd-ease);
}
body.hd-page .hd-card:hover {
    border-color: var(--hd-accent);
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.10);
    transform: translateY(-2px);
}

/* Focus ring is drawn on the card, but the tab stop is the inner link. */
body.hd-page .hd-card:focus-within {
    border-color: var(--hd-accent);
    outline: 3px solid var(--hd-ring);
    outline-offset: 2px;
}
body.hd-page .hd-card__link:focus { outline: none; }
/* Fallback for engines without :focus-within */
body.hd-page .hd-card__link:focus {
    text-decoration: underline;
}

body.hd-page .hd-card__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin-bottom: var(--hd-space-4);
    border-radius: var(--hd-radius);
    background: var(--hd-muted);
    color: var(--hd-accent);
    font-size: 1.125rem;
    flex: 0 0 auto;
}

body.hd-page .hd-card__title {
    font-size: 1.0625rem;
    font-weight: 600;
    line-height: 1.35;
    margin: 0 0 var(--hd-space-2) 0;
    color: var(--hd-fg);
}
body.hd-page .hd-card__link {
    color: inherit;
    text-decoration: none;
}
body.hd-page .hd-card__link:hover { color: var(--hd-accent); }
/* Overlay makes the whole card clickable while keeping ONE tab stop.
   Bootstrap 4.0.0 predates .stretched-link, so this is done here. */
body.hd-page .hd-card__link::after {
    content: "";
    position: absolute;
    top: 0; right: 0; bottom: 0; left: 0;
    border-radius: var(--hd-radius);
}

body.hd-page .hd-card__text {
    font-size: 0.9375rem;
    color: var(--hd-muted-fg);
    margin: 0 0 var(--hd-space-5) 0;
}

body.hd-page .hd-card__cta {
    display: inline-flex;
    align-items: center;
    gap: var(--hd-space-2);
    margin-top: auto;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--hd-accent);
}
body.hd-page .hd-card__cta .hd-arrow {
    transition: transform var(--hd-dur) var(--hd-ease);
    margin-left: var(--hd-space-2);
}
body.hd-page .hd-card:hover .hd-arrow { transform: translateX(3px); }

/* ---------- Staff strip ---------- */
body.hd-page .hd-staff {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--hd-space-4);
    margin-top: var(--hd-space-7);
    padding: var(--hd-space-5);
    background: var(--hd-card);
    border: 1px solid var(--hd-border);
    border-left: 3px solid var(--hd-primary);
    border-radius: var(--hd-radius);
}
body.hd-page .hd-staff__body { flex: 1 1 260px; }
body.hd-page .hd-staff__title {
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 var(--hd-space-1) 0;
}
body.hd-page .hd-staff__text {
    font-size: 0.9375rem;
    color: var(--hd-muted-fg);
    margin: 0;
}
body.hd-page .hd-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;                /* touch target */
    padding: var(--hd-space-3) var(--hd-space-5);
    border-radius: var(--hd-radius);
    background: var(--hd-accent);
    color: var(--hd-on-accent);
    font-size: 0.9375rem;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid transparent;
    transition: background-color var(--hd-dur) var(--hd-ease);
}
body.hd-page .hd-btn:hover,
body.hd-page .hd-btn:focus {
    background: var(--hd-accent-strong);
    color: var(--hd-on-accent);
    text-decoration: none;
}
body.hd-page .hd-btn:focus {
    outline: 3px solid var(--hd-ring);
    outline-offset: 2px;
}

/* ---------- Motion (dial 3/10 - subtle) ---------- */
@media (prefers-reduced-motion: no-preference) {
    body.hd-page .hd-reveal {
        opacity: 0;
        transform: translateY(12px);
        animation: hd-reveal 350ms var(--hd-ease) forwards;
    }
    body.hd-page .hd-reveal:nth-child(1) { animation-delay:  0ms; }
    body.hd-page .hd-reveal:nth-child(2) { animation-delay: 40ms; }
    body.hd-page .hd-reveal:nth-child(3) { animation-delay: 80ms; }
    body.hd-page .hd-reveal:nth-child(4) { animation-delay: 120ms; }
}
@keyframes hd-reveal {
    to { opacity: 1; transform: translateY(0); }
}
/* prefers-reduced-motion: no animation is declared at all, and every
   transition is neutralised, so content renders in its final state. */
@media (prefers-reduced-motion: reduce) {
    body.hd-page *,
    body.hd-page *::before,
    body.hd-page *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
    body.hd-page .hd-card:hover { transform: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 575.98px) {
    body.hd-page .hd-main {
        padding-top: var(--hd-space-5);
        padding-bottom: var(--hd-space-5);
    }
    body.hd-page .hd-title { font-size: 1.5rem; }
    body.hd-page .hd-btn { width: 100%; }
    /* readable-font-size: keep body text at 16px on small screens */
    body.hd-page .hd-card__text,
    body.hd-page .hd-card__cta,
    body.hd-page .hd-staff__text { font-size: 1rem; }
}
@media (min-width: 992px) {
    body.hd-page .hd-title { font-size: 2.25rem; }
}
