/*
 * Edayathu professional theme
 *
 * Additive presentation layer only. It deliberately retains every existing
 * selector and interaction hook used by the site scripts.
 */

:root {
    color-scheme: dark;
    --heritage-950: #061310;
    --heritage-925: #081915;
    --heritage-900: #0b201b;
    --heritage-850: #102923;
    --heritage-800: #17352e;
    --heritage-gold: #d0ad63;
    --heritage-gold-soft: #ead49a;
    --heritage-ivory: #f6f1e7;
    --heritage-sage: #bdc9c2;
    --heritage-danger: #f48a86;
    --heritage-focus: #f3cc72;
    --surface-solid: rgba(9, 27, 23, 0.96);
    --surface-raised: rgba(16, 41, 35, 0.94);
    --surface-soft: rgba(255, 255, 255, 0.045);
    --surface-border: rgba(234, 212, 154, 0.2);
    --surface-border-strong: rgba(234, 212, 154, 0.38);
    --shadow-soft: 0 18px 48px rgba(0, 0, 0, 0.28);
    --shadow-raised: 0 24px 64px rgba(0, 0, 0, 0.38);
    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 20px;
    --content-width: 1180px;
    --reading-width: 72ch;
    --photo-hero-height: 30rem;

    /* Existing components continue to consume these established tokens. */
    --primary-color: var(--heritage-gold);
    --bg-dark: var(--heritage-900);
    --bg-darker: var(--heritage-950);
    --text-primary: var(--heritage-ivory);
    --text-secondary: var(--heritage-sage);
    --glass-bg: var(--surface-solid);
    --glass-border: var(--surface-border);
}

html {
    background: var(--heritage-950);
    scroll-padding-top: 5.25rem;
}

.skip-link {
    position: fixed;
    top: 0.75rem;
    left: 0.75rem;
    z-index: 4000;
    padding: 0.7rem 1rem;
    border: 2px solid var(--heritage-focus);
    border-radius: var(--radius-sm);
    background: var(--heritage-950);
    color: var(--heritage-ivory);
    font-weight: 700;
    transform: translateY(-180%);
    transition: transform 0.15s ease;
}

.skip-link:focus {
    transform: translateY(0);
}

body {
    position: relative;
    isolation: isolate;
    background:
        radial-gradient(circle at 82% 22%, rgba(44, 91, 73, 0.12), transparent 32rem),
        linear-gradient(180deg, var(--heritage-950) 0%, #0a1c18 48%, var(--heritage-950) 100%);
    color: var(--heritage-ivory);
    line-height: 1.55;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

.home-page {
    --photo-hero-height: clamp(30rem, 58svh, 36rem);
}

.members-page,
.details-page,
.privacy-page {
    --photo-hero-height: clamp(22rem, 42svh, 28rem);
}

.not-found-page {
    --photo-hero-height: 100svh;
}

/* Photography is reserved for the opening masthead. */
.dynamic-bg {
    position: absolute;
    inset: 0 0 auto;
    z-index: 0;
    width: 100%;
    height: var(--photo-hero-height);
    background: var(--heritage-950);
}

.bg-slide {
    background-position: center 42%;
    will-change: opacity;
}

.bg-overlay {
    background: linear-gradient(
        180deg,
        rgba(4, 15, 13, 0.5) 0%,
        rgba(5, 19, 16, 0.7) 58%,
        var(--heritage-950) 100%
    );
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

@keyframes fadeSlideshow {
    0%, 7% { opacity: 0; transform: none; }
    10%, 21% { opacity: 1; transform: none; }
    25%, 100% { opacity: 0; transform: none; }
}

.dynamic-bg.js-run .bg-slide,
.dynamic-bg.js-run .bg-slide.active {
    transform: none;
}

.dynamic-bg.js-run .bg-slide {
    transition: opacity 1.25s ease;
}

.hero,
main.container,
footer,
.nf-wrap {
    position: relative;
}

.hero,
main.container,
.nf-wrap {
    z-index: 1;
}

/* Navigation */
.site-nav {
    position: sticky;
    top: 0;
    padding: 0.8rem max(1rem, calc((100vw - var(--content-width)) / 2 + 2rem));
    background: rgba(6, 19, 16, 0.78);
    border-bottom-color: rgba(234, 212, 154, 0.12);
    backdrop-filter: blur(14px) saturate(115%);
    -webkit-backdrop-filter: blur(14px) saturate(115%);
}

.site-nav.scrolled {
    background: rgba(6, 19, 16, 0.94);
    border-bottom-color: var(--surface-border);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.18);
}

.nav-brand {
    color: var(--heritage-gold-soft);
    font-size: 1.42rem;
    letter-spacing: 0.035em;
}

.nav-links {
    gap: 1.1rem;
}

.nav-link {
    color: var(--heritage-ivory);
    opacity: 0.86;
}

.nav-link:hover,
.nav-link[aria-current="page"] {
    color: var(--heritage-gold-soft);
    opacity: 1;
}

.nav-link::after {
    bottom: -0.35rem;
    background: var(--heritage-gold);
}

/* Mastheads */
.hero {
    display: flex;
    min-height: 18rem;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: visible;
    padding: 4rem 1.5rem 3rem;
}

.home-page .hero {
    min-height: 28rem;
    padding-top: 5rem;
}

.hero-compact {
    min-height: 18rem;
    padding: 3.25rem 1.5rem 2.5rem;
}

.family-name {
    color: var(--heritage-ivory);
    font-size: clamp(3rem, 6vw, 5rem);
    line-height: 1.05;
    letter-spacing: 0.025em;
    background: linear-gradient(105deg, var(--heritage-ivory), var(--heritage-gold-soft) 50%, var(--heritage-ivory));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: none;
}

.hero-compact .family-name {
    font-size: clamp(2.6rem, 5vw, 4rem);
}

.hero-tagline,
.contact-email {
    max-width: 42rem;
    color: var(--heritage-sage);
    line-height: 1.65;
    letter-spacing: 0.025em;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.55);
}

.divider {
    width: 4.5rem;
    height: 2px;
    margin: 1.25rem auto 0.9rem;
    background: var(--heritage-gold);
}

.divider::after {
    display: none;
}

.scroll-cue {
    margin-top: 1.25rem;
    border-color: var(--surface-border-strong);
    background: rgba(6, 19, 16, 0.58);
    animation: none;
}

/* Page frame and readable surfaces */
.container {
    width: 100%;
    max-width: var(--content-width);
    padding-inline: clamp(1rem, 3vw, 2rem);
}

.glass-panel {
    padding: clamp(1.5rem, 3.5vw, 2.75rem);
    border: 1px solid var(--surface-border);
    border-radius: var(--radius-lg);
    background: linear-gradient(145deg, rgba(15, 39, 33, 0.97), rgba(8, 26, 22, 0.97));
    box-shadow: var(--shadow-soft);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.home-page .about-section {
    max-width: 58rem;
    margin-inline: auto;
}

.about-section p,
.privacy-panel p,
.privacy-panel li,
.bio-text {
    max-width: var(--reading-width);
    margin-inline: auto;
    color: var(--heritage-sage);
    line-height: 1.8;
    text-align: left;
    text-shadow: none;
}

.about-section p {
    font-size: clamp(1.02rem, 1.5vw, 1.12rem);
}

.privacy-panel {
    max-width: 54rem;
    margin-inline: auto;
}

.privacy-panel h2 {
    margin: 2.1rem auto 0.75rem;
    max-width: var(--reading-width);
}

.privacy-panel h2:first-of-type {
    margin-top: 1.4rem;
}

.privacy-panel p + p,
.privacy-panel ul + p {
    margin-top: 0.9rem;
}

.privacy-panel ul {
    max-width: var(--reading-width);
    margin: 0 auto 1rem;
    padding-left: 1.35rem;
}

.privacy-panel li + li {
    margin-top: 0.55rem;
}

:is(
    .about-section,
    .tree-section,
    .events-section,
    .teaser-section,
    .celebrations-panel,
    .calendar-panel,
    .news-panel,
    .map-panel,
    .admin-panel,
    .auth-panel,
    .dashboard-panel,
    .candle-section,
    .details-thanks,
    .privacy-panel
) > h2,
.admin-tools-title {
    color: var(--heritage-gold-soft);
    font-size: clamp(1.65rem, 3vw, 2.25rem);
    line-height: 1.2;
    letter-spacing: 0.015em;
    text-shadow: none;
}

.subtitle,
.auth-text,
.details-intro,
.auth-privacy,
.dash-empty,
.dash-news-text {
    color: var(--heritage-sage);
    line-height: 1.7;
}

.auth-privacy {
    margin-top: 1rem;
    font-size: 0.88rem;
}

.auth-privacy a,
.consent-note a,
.privacy-panel a {
    color: var(--heritage-gold-soft);
    text-underline-offset: 0.2em;
}

.today-strip,
.saint-strip {
    border: 1px solid var(--surface-border);
    border-radius: var(--radius-md);
    background: rgba(8, 27, 23, 0.93);
    box-shadow: 0 12px 34px rgba(0, 0, 0, 0.2);
}

.saint-strip {
    border-style: solid;
}

.today-strip:hover {
    border-color: var(--surface-border-strong);
    background: rgba(15, 42, 35, 0.96);
}

.verse-section {
    max-width: 44rem;
    padding: 1.5rem clamp(1rem, 4vw, 2.5rem);
    border-block: 1px solid rgba(234, 212, 154, 0.16);
}

.verse-section p {
    color: var(--heritage-ivory);
    line-height: 1.65;
}

.flourish {
    margin-block: 2.75rem;
    opacity: 0.42;
}

/* Cards and information groups */
.teaser-card,
.event-card,
.dash-tile,
.celebration-card,
.news-item,
.admin-row,
.story-memory,
.cal-detail-row,
.invite-box {
    border: 1px solid var(--surface-border);
    border-radius: var(--radius-md);
    background: var(--surface-soft);
    box-shadow: none;
}

.events-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 18.75rem), 1fr));
    gap: 1.25rem;
}

.events-grid .event-card {
    min-width: 0;
    margin: 0;
    padding: 1.5rem;
    backdrop-filter: none;
}

.teaser-card:hover,
.event-card:hover,
.celebration-card:hover,
.admin-row:hover,
.tree-card:hover {
    transform: none;
    border-color: var(--surface-border-strong);
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.24);
}

.dash-grid {
    gap: 1rem;
}

.dash-tile {
    min-height: 8rem;
    padding: 1.1rem 1.2rem;
}

.dash-tile h3,
.dash-ritual h3,
.event-card h3,
.upcoming-title {
    color: var(--heritage-gold-soft);
}

.admin-tools {
    border: 1px solid var(--surface-border-strong);
    border-radius: var(--radius-lg);
    background: rgba(7, 23, 19, 0.94);
    box-shadow: var(--shadow-soft);
}

.admin-tools-scroll > .admin-panel {
    background: rgba(14, 38, 32, 0.96);
}

.live-map,
.tree-canvas {
    border-color: var(--surface-border);
    background: var(--heritage-925);
}

/* Buttons: clear primary, secondary, and destructive treatments. */
.gold-btn,
.nav-cta,
.lang-toggle,
.location-btn {
    min-height: 44px;
    border: 1px solid rgba(208, 173, 99, 0.66);
    border-radius: var(--radius-sm);
    background: rgba(208, 173, 99, 0.1);
    color: var(--heritage-gold-soft);
    font-weight: 600;
    line-height: 1.2;
    box-shadow: none;
}

.nav-cta,
.lang-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.nav-cta,
.gold-btn-lg,
.submit-btn {
    border-color: var(--heritage-gold);
    background: var(--heritage-gold);
    color: var(--heritage-950);
}

.gold-btn:hover:not(:disabled),
.nav-cta:hover,
.lang-toggle:hover,
.location-btn:hover {
    transform: none;
    border-color: var(--heritage-gold-soft);
    background: var(--heritage-gold-soft);
    color: var(--heritage-950) !important;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.22);
}

.gold-btn:active:not(:disabled),
.nav-cta:active,
.lang-toggle:active,
.location-btn:active {
    transform: none;
}

.gold-btn::before,
.nav-cta::before {
    display: none;
}

.gold-btn:disabled {
    opacity: 0.52;
}

:is(
    .event-remove,
    .photo-del,
    .blessing-del,
    #ed-photo-remove,
    button[aria-label^="Remove"],
    button[aria-label^="Delete"]
) {
    border-color: rgba(244, 138, 134, 0.58);
    background: rgba(244, 138, 134, 0.1);
    color: var(--heritage-danger);
}

:is(
    .event-remove,
    .photo-del,
    .blessing-del,
    #ed-photo-remove,
    button[aria-label^="Remove"],
    button[aria-label^="Delete"]
):hover {
    border-color: var(--heritage-danger);
    background: var(--heritage-danger);
    color: var(--heritage-950);
}

:is(
    .close-btn,
    .lightbox-close,
    .lightbox-arrow,
    .event-remove,
    .photo-del,
    .blessing-del,
    .branch-chevron
) {
    min-width: 44px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.branch-chevron {
    bottom: -22px;
    background: var(--heritage-900);
}

.mini-btn:not(.mini-del) {
    min-height: 44px;
    padding-inline: 0.75rem;
}

.mini-del::after {
    content: "";
    position: absolute;
    inset: -13px;
}

/* Forms */
:is(
    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="search"],
    input[type="tel"],
    input[type="number"],
    input[type="date"],
    select,
    textarea
) {
    border-color: var(--surface-border);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.055);
    color: var(--heritage-ivory);
    caret-color: var(--heritage-gold-soft);
}

.big-input,
.big-select,
.dir-grid input,
.dir-select,
.tree-search,
.blessing-form input,
.news-admin input[type="text"],
.news-admin textarea,
.editor-modal-content select,
.editor-modal-content textarea,
.wa-test-row input,
#message-form textarea,
.wa-reply textarea,
.story-admin textarea,
.story-share textarea {
    border-color: var(--surface-border);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.055);
    color: var(--heritage-ivory);
}

input::placeholder,
textarea::placeholder {
    color: rgba(189, 201, 194, 0.68);
    opacity: 1;
}

.big-label,
.dir-grid label,
.ed-details-label,
.info-label {
    color: var(--heritage-gold-soft);
}

.big-input,
.big-select {
    min-height: 50px;
}

.choice-card {
    border-color: var(--surface-border);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.04);
}

.choice-card:has(input:checked) {
    border-color: var(--heritage-gold);
    background: rgba(208, 173, 99, 0.13);
    color: var(--heritage-gold-soft);
}

.consent-note {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.75rem;
    align-items: start;
    margin-top: 1rem;
    padding: 1rem;
    border: 1px solid var(--surface-border);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.035);
    color: var(--heritage-sage);
    font-size: 0.93rem;
    line-height: 1.55;
}

.consent-note input {
    width: 1.2rem;
    height: 1.2rem;
    margin-top: 0.15rem;
    accent-color: var(--heritage-gold);
}

.event-row {
    padding-right: 3.75rem;
}

.blessing-item {
    padding-right: 3.4rem;
}

.auth-card {
    padding: clamp(1rem, 3vw, 1.6rem);
    border: 1px solid var(--surface-border);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.025);
    animation: none;
}

.auth-tabs {
    border-bottom-color: var(--surface-border);
}

.auth-tab {
    min-height: 48px;
    color: var(--heritage-sage);
}

.auth-tab.active {
    color: var(--heritage-gold-soft);
    border-bottom-color: var(--heritage-gold);
}

.dir-error {
    color: var(--heritage-danger);
}

/* A highly visible, consistent keyboard focus treatment. */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
    outline: 3px solid var(--heritage-focus) !important;
    outline-offset: 3px;
    border-color: var(--heritage-focus) !important;
    box-shadow: 0 0 0 5px rgba(243, 204, 114, 0.2) !important;
}

.choice-card:has(input:focus-visible) {
    outline: 3px solid var(--heritage-focus);
    outline-offset: 3px;
}

/* Dialogs remain animated visually but are removed from keyboard navigation
   while hidden through visibility. JavaScript can keep its existing class API. */
.modal,
.lightbox {
    padding: 1rem;
}

.modal.hidden,
.lightbox.hidden {
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease, visibility 0s linear 0.18s;
}

.modal:not(.hidden),
.lightbox:not(.hidden) {
    visibility: visible;
    transition: opacity 0.18s ease, visibility 0s linear 0s;
}

body.modal-open {
    overflow: hidden;
}

.modal-content {
    width: min(100%, 44rem);
    max-height: calc(100dvh - 2rem);
    margin: 0;
    padding: clamp(1.25rem, 4vw, 2rem);
    overflow-y: auto;
    overscroll-behavior: contain;
    border-color: var(--surface-border-strong);
    border-radius: var(--radius-md);
    background: var(--heritage-900);
    box-shadow: var(--shadow-raised);
    animation: none;
}

.profile-modal-content {
    width: min(100%, 40rem);
    max-height: calc(100dvh - 2rem);
    padding: clamp(1.25rem, 4vw, 2rem);
    overflow-y: auto;
    background: var(--heritage-900);
}

.gallery-modal-content {
    width: min(100%, 62.5rem);
    max-height: calc(100dvh - 2rem);
}

/* Decorative motion is intentionally restrained. */
.dust,
.divider::after {
    display: none !important;
}

.family-name .ltr,
.teaser-card:hover .teaser-icon,
.auth-card,
.candle-cta,
.scroll-cue,
.tree-card.card-glow,
.pulse-once {
    animation: none;
}

.teaser-card,
.teaser-card.tilting {
    transform: none !important;
    transform-style: flat;
}

.photo-wrapper {
    opacity: 1;
    transform: none;
    animation: none;
}

.photo-wrapper:hover img {
    transform: scale(1.015);
}

.candle:hover {
    transform: none;
}

.c-angel {
    animation: none;
    opacity: 0.34;
}

.c-angel-one {
    transform: translate(-190px, -8px);
}

.c-angel-two {
    transform: translate(190px, -8px);
}

.growing-tree {
    width: 132px;
    opacity: 0.12;
}

.candle-cta {
    opacity: 1;
    border-color: var(--surface-border-strong);
    background: rgba(208, 173, 99, 0.08);
}

.candle svg {
    width: min(230px, 72vw);
    height: auto;
}

/* Footer */
footer {
    border-top-color: var(--surface-border);
    background: rgba(5, 17, 14, 0.58);
}

.footer-links a,
footer p {
    color: var(--heritage-sage);
}

/* Malayalam uses its own readable system fallbacks and natural spacing. */
html:lang(ml) body {
    font-family: "Noto Sans Malayalam", "Nirmala UI", "Kartika", sans-serif;
}

html:lang(ml) :where(
    .family-name,
    h1,
    h2,
    h3,
    h4,
    .nav-brand,
    .verse-section p
) {
    font-family: "Noto Serif Malayalam", "Noto Sans Malayalam", "Nirmala UI", serif;
}

html:lang(ml) :where(
    .role-tag,
    .info-label,
    .dir-grid label,
    .tree-stats,
    .news-date,
    .verse-section cite
) {
    text-transform: none;
    letter-spacing: 0;
}

/* Tablet and phone layout */
@media (max-width: 768px) {
    .home-page {
        --photo-hero-height: 27rem;
    }

    .members-page,
    .details-page,
    .privacy-page {
        --photo-hero-height: 23rem;
    }

    .site-nav {
        padding: 0.65rem 1rem;
    }

    .hero {
        min-height: 20rem;
        padding: 3rem 1rem 2rem;
    }

    .home-page .hero {
        min-height: 23rem;
        padding-top: 3.5rem;
    }

    .hero-compact {
        min-height: 16rem;
        padding: 2.5rem 1rem 2rem;
    }

    .family-name,
    .hero-compact .family-name {
        font-size: clamp(2.35rem, 9vw, 3.4rem);
    }

    .glass-panel {
        margin-bottom: 2rem;
        padding: 1.35rem;
        border-radius: var(--radius-md);
    }

    .about-section,
    .events-section,
    .tree-section {
        padding-inline: 0;
    }

    .events-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 1rem;
    }

    .admin-tools {
        padding: 1rem;
    }

    .admin-tools-scroll {
        max-height: none;
        overflow: visible;
        padding-right: 0;
    }

    .modal {
        align-items: center;
        padding: 0.75rem;
    }

    .modal-content,
    .profile-modal-content,
    .gallery-modal-content {
        width: 100%;
        max-height: calc(100dvh - 1.5rem);
        padding: 1.25rem;
    }

    .profile-header {
        gap: 1rem;
        margin-bottom: 1.25rem;
        padding-bottom: 1.25rem;
    }

    .growing-tree,
    .c-angel {
        display: none !important;
    }

    .tree-canvas {
        height: 430px;
    }

    .footer-links {
        gap: 0.55rem 0.7rem;
    }
}

@media (max-width: 390px) {
    .site-nav {
        gap: 0.35rem;
        padding: 0.5rem 0.65rem;
    }

    .nav-brand {
        font-size: 1.08rem;
        letter-spacing: 0.02em;
    }

    .nav-links {
        gap: 0.35rem;
    }

    .nav-link {
        padding-inline: 0.1rem;
        font-size: 0.8rem;
    }

    .nav-cta,
    .lang-toggle {
        padding-inline: 0.65rem;
        font-size: 0.8rem;
    }

    .container {
        padding-inline: 0.75rem;
    }

    .hero-tagline,
    .contact-email {
        font-size: 0.98rem;
    }

    .glass-panel {
        padding: 1.1rem;
    }

    .choice-row {
        gap: 0.5rem;
    }

    .choice-card {
        min-width: 0;
        padding-inline: 0.35rem;
        font-size: 0.98rem;
    }

    .date-picker {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .big-select {
        min-width: 0;
        width: 100%;
        padding-inline: 0.4rem;
        font-size: 0.95rem;
    }

    .calendar-panel {
        padding-inline: 0.55rem;
    }

    .cal-grid,
    .cal-weekdays {
        gap: 2px;
    }

    .cal-cell {
        min-width: 0;
        min-height: 52px;
        padding: 0.18rem;
    }

    .member-nav {
        left: max(0.35rem, env(safe-area-inset-left));
        right: max(0.35rem, env(safe-area-inset-right));
        bottom: max(0.35rem, env(safe-area-inset-bottom));
    }

    .member-nav button {
        min-height: 54px;
        padding-inline: 0.2rem;
    }

    .member-nav .mn-label {
        font-size: 0.7rem;
    }

    footer {
        padding: 1.5rem 1rem;
    }

    body.has-member-nav footer {
        padding-bottom: 6rem;
    }
}

@media (max-width: 340px) {
    .nav-link[href="index.html"] {
        display: none;
    }

    .date-picker {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .date-picker .dp-year {
        grid-column: 1 / -1;
    }

    .family-name,
    .hero-compact .family-name {
        font-size: 2.15rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation: none !important;
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        transition-delay: 0ms !important;
    }

    .dynamic-bg.js-run .bg-slide,
    .dynamic-bg.js-run .bg-slide.active,
    .teaser-card,
    .teaser-card.tilting {
        transform: none !important;
    }

    .dynamic-bg.js-run .bg-slide {
        transition: opacity 0.2s linear !important;
    }

    .photo-wrapper,
    .js .reveal,
    .js .reveal.visible {
        opacity: 1;
        transform: none;
    }
}

@media (prefers-contrast: more) {
    :root {
        --surface-border: rgba(246, 241, 231, 0.44);
        --surface-border-strong: rgba(246, 241, 231, 0.68);
    }

    .glass-panel,
    .modal-content,
    .admin-tools {
        background: var(--heritage-950);
    }

    .text-secondary,
    .subtitle,
    .auth-text {
        color: var(--heritage-ivory);
    }
}

@media (forced-colors: active) {
    .family-name,
    .nf-code {
        background: none !important;
        -webkit-text-fill-color: currentColor !important;
        color: CanvasText !important;
    }
}
