/* Explain: Styles for glass effects, brand elements, buttons, input fields, and animations. */
.glass-panel {
    background: var(--surface-color);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 16px 40px -24px var(--shadow-color);
    transition: transform 0.45s ease, box-shadow 0.45s ease;
}

.glass-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 26px 52px -26px rgba(13, 43, 69, 0.3);
}

.glass-on-dark {
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.24);
}

.site-header.is-scrolled .glass-panel {
    box-shadow: 0 12px 30px -16px rgba(13, 43, 69, 0.26);
}

.section-eyebrow {
    display: inline-block;
    font-family: var(--font-heading);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--accent-strong);
    margin-bottom: 1rem;
}

.section-eyebrow-light {
    color: var(--accent-soft);
}

.brand-rule {
    display: block;
    width: 68px;
    height: 4px;
    border-radius: 9999px;
    margin-bottom: 1.4rem;
    background: linear-gradient(90deg,
        var(--primary-color) 0%,
        var(--primary-color) 64%,
        var(--accent-color) 64%,
        var(--accent-color) 100%);
}

.brand-rule-center {
    margin-left: auto;
    margin-right: auto;
}

/* KEM Edusolutions brand logo — light + dark background versions */
.kem-logo {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    padding: 0.35rem 0.85rem;
    border: 3px solid var(--primary-color);
    border-radius: 0.9rem;
    background: var(--surface-solid);
    line-height: 1;
    text-decoration: none;
    transition: border-color 0.3s ease, background 0.3s ease;
}

.kem-logo__word {
    display: inline-flex;
    align-items: baseline;
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    color: var(--primary-color);
}

.kem-logo__word .is-accent {
    color: var(--accent-color);
}

.kem-logo__sub {
    margin-top: 0.22rem;
    font-family: var(--font-heading);
    font-size: 0.5rem;
    font-weight: 600;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--primary-color);
}

.kem-logo--dark {
    background: #0A1523;
    border-color: rgba(255, 255, 255, 0.92);
}

.kem-logo--dark .kem-logo__word,
.kem-logo--dark .kem-logo__sub {
    color: #FFFFFF;
}

.btn-soft,
.btn-accent,
.btn-soft-outline,
.btn-on-dark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    min-height: 48px;
    padding: 0.8rem 1.75rem;
    border-radius: 9999px;
    font-family: var(--font-heading);
    font-weight: 500;
    letter-spacing: 0.01em;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-soft {
    background: var(--primary-color);
    color: #FFFFFF;
    box-shadow: 0 12px 26px -14px rgba(14, 134, 196, 0.75);
}
.btn-soft:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 18px 32px -16px rgba(14, 134, 196, 0.8);
}

.btn-accent {
    background: var(--accent-color);
    color: #241806;
    box-shadow: 0 12px 26px -14px rgba(247, 148, 30, 0.75);
}
.btn-accent:hover {
    background: #E9850C;
    transform: translateY(-2px);
    box-shadow: 0 18px 32px -16px rgba(247, 148, 30, 0.8);
}

.btn-soft-outline {
    background: var(--surface-solid);
    color: var(--primary-color);
    border: 1px solid var(--border-color);
}
.btn-soft-outline:hover {
    background: var(--primary-soft);
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.btn-on-dark {
    background: rgba(255, 255, 255, 0.12);
    color: var(--text-on-dark);
    border: 1px solid rgba(255, 255, 255, 0.35);
}
.btn-on-dark:hover {
    background: rgba(255, 255, 255, 0.22);
}

.media-scrim {
    background: linear-gradient(160deg, rgba(13, 43, 69, 0.9), rgba(10, 109, 163, 0.8));
}

.media-scrim-soft {
    background: linear-gradient(to top, rgba(13, 43, 69, 0.85) 0%, rgba(13, 43, 69, 0.15) 55%, transparent 100%);
}

.field-input {
    width: 100%;
    min-height: 48px;
    background: var(--surface-solid);
    border: 1px solid var(--border-color);
    border-radius: 0.9rem;
    padding: 0.75rem 1rem;
    color: var(--text-color);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.field-input::placeholder {
    color: #94A3B4;
}
.field-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px var(--primary-soft);
}

/* Pill tabs (Technology Services / Business Consulting, VRLab experiment list) */
.division-tab,
.lab-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    min-height: 48px;
    padding: 0.85rem 1.6rem;
    border-radius: 9999px;
    font-family: var(--font-heading);
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--text-muted);
    background: var(--surface-solid);
    border: 1px solid var(--border-color);
    cursor: pointer;
    transition: all 0.3s ease;
}
.division-tab:hover,
.lab-tab:hover {
    color: var(--primary-color);
    border-color: var(--primary-color);
}
.division-tab.is-active,
.lab-tab.is-active {
    background: var(--secondary-color);
    color: var(--text-on-dark);
    border-color: var(--secondary-color);
    box-shadow: 0 14px 28px -18px rgba(13, 43, 69, 0.8);
}

.division-panel {
    display: none;
}
.division-panel.is-active {
    display: block;
    animation: panelIn 0.45s ease both;
}

@keyframes panelIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: none; }
}

/* Decorative brand stripes */
.diag-bar {
    position: absolute;
    height: 12px;
    border-radius: 9999px;
    transform: rotate(-38deg);
    pointer-events: none;
}
.diag-bar-accent {
    background: var(--accent-color);
    opacity: 0.7;
}
.diag-bar-primary {
    background: var(--primary-color);
    opacity: 0.45;
}

/* Form feedback */
.form-feedback {
    display: none;
    margin-top: 0.75rem;
    padding: 1rem;
    border-radius: 1rem;
    font-size: 0.875rem;
    line-height: 1.5;
    text-align: center;
    border: 1px solid transparent;
}
.form-feedback.is-visible {
    display: block;
}
.form-feedback.is-success {
    background: #ECFDF5;
    border-color: #A7F3D0;
    color: #065F46;
}
.form-feedback.is-error {
    background: #FEF2F2;
    border-color: #FECACA;
    color: #991B1B;
}

/* Scroll reveal */
.reveal {
    opacity: 0;
    transform: translateY(26px);
    transition: opacity 0.85s ease, transform 0.85s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal.is-visible {
    opacity: 1;
    transform: none;
}

/* Images keep their real proportions — never stretched, never cropped */
img {
    max-width: 100%;
    border-radius: 0.9rem;
    object-position: center;
}

/* Framed images show in full at their natural shape and fill the width of their holder */
img[class*="h-full"] {
    width: 100%;
    height: auto !important;
    object-fit: contain;
    padding: 0 !important;
    border-radius: inherit;
}

/* Image holders drop their forced ratio and grow or shrink to match the picture */
[class*="aspect-"] {
    aspect-ratio: auto !important;
    height: auto !important;
}

[class*="aspect-"] img {
    height: auto !important;
}

/* Framed media keeps a larger, consistent radius on its wrapper */
.media-frame {
    border-radius: 1.5rem;
    overflow: hidden;
}

@media (prefers-reduced-motion: reduce) {
    .reveal { opacity: 1; transform: none; transition: none; }
    .division-panel.is-active { animation: none; }
}