:root {
    --maroon: #6e2a33;
    --gold: #c9a24b;
    --cream: #f8f3ec;
    --home-maroon: var(--maroon);
    --home-maroon-deep: #40191f;
    --home-gold: var(--gold);
    --home-gold-light: #f3dfa9;
    --home-cream: var(--cream);
    --home-text: #342b2a;
    --home-muted: #746b66;
    --home-divider: rgba(91, 67, 55, .14);
    --home-gold-button: linear-gradient(135deg, #f3dfa9 0%, #d2a84f 100%);
}

.public-navbar {
    border-bottom: 1px solid rgba(201, 162, 75, .8);
}

.public-nav-links a:not(.nav-button)::after {
    background: var(--home-gold-light);
}

.public-nav-links .nav-button[href="login.php"],
.public-nav-links .nav-button[href="register_household.php"] {
    color: #fff;
    background: linear-gradient(180deg, #87414a 0%, #642630 100%);
    border: 1px solid rgba(255, 255, 255, .28);
    box-shadow: 0 6px 14px rgba(34, 15, 17, .24), inset 0 1px 0 rgba(255, 255, 255, .16);
}

.public-nav-links .nav-button[href="login.php"]:hover,
.public-nav-links .nav-button[href="register_household.php"]:hover {
    color: #fff;
    background: linear-gradient(180deg, #9b4b56 0%, #762e39 100%);
    border-color: rgba(255, 255, 255, .48);
    box-shadow: 0 9px 18px rgba(34, 15, 17, .3), inset 0 1px 0 rgba(255, 255, 255, .22);
}

.public-nav-links .nav-button[href="login.php"]:focus-visible,
.public-nav-links .nav-button[href="register_household.php"]:focus-visible {
    outline: 2px solid #f3dfa9;
    outline-offset: 3px;
}

.hero-section {
    overflow: visible;
}

.hero-background {
    filter: none;
    transform: none;
}

.hero-section > .hero-overlay {
    background: transparent;
}

.hero-section .hero-left-panel {
    display: block;
    width: min(58%, 700px);
    background:
        radial-gradient(ellipse at 24% 32%, rgba(232, 199, 119, .34), transparent 46%),
        radial-gradient(ellipse at 62% 72%, rgba(133, 190, 213, .2), transparent 54%),
        linear-gradient(90deg, rgba(31, 29, 27, .84) 0%, rgba(35, 31, 29, .7) 50%, transparent 100%);
    clip-path: none;
}

.hero-section .hero-left-panel::after {
    inset: -18px;
    width: auto;
    height: auto;
    background:
        radial-gradient(ellipse at 28% 32%, rgba(255, 224, 153, .38), transparent 42%),
        radial-gradient(ellipse at 58% 70%, rgba(158, 207, 224, .22), transparent 48%);
    filter: blur(30px);
    clip-path: none;
}

.hero-section .hero-diagonal {
    display: none;
}

.hero-section::after {
    position: absolute;
    z-index: 5;
    right: 0;
    bottom: -1px;
    left: 0;
    height: 54px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 64' preserveAspectRatio='none'%3E%3Cpath d='M0 26 C240 60 440 5 720 28 C1000 52 1180 58 1440 20 L1440 64 L0 64 Z' fill='%23f8f3ec'/%3E%3Cpath d='M0 26 C240 60 440 5 720 28 C1000 52 1180 58 1440 20' fill='none' stroke='%23c9a24b' stroke-opacity='.8' stroke-width='1.5'/%3E%3C/svg%3E") center bottom / 100% 100% no-repeat;
    content: "";
    pointer-events: none;
}

.hero-features.scroll-reveal {
    opacity: 1;
    transform: translateX(-50%);
    transition:
        opacity .75s ease,
        transform .85s cubic-bezier(.22, .61, .36, 1),
        border-color .35s ease,
        box-shadow .35s ease,
        background-color .35s ease;
    will-change: transform;
}

.js .hero-features.scroll-reveal:not(.visible) {
    opacity: 0;
    transform: translateX(-50%) translateY(36px);
}

.hero-features.scroll-reveal::before {
    position: absolute;
    top: 0;
    right: 24px;
    left: 24px;
    height: 3px;
    border-radius: 0 0 999px 999px;
    background: linear-gradient(90deg, var(--home-gold), var(--home-gold-light));
    content: "";
    pointer-events: none;
    transform: scaleX(.35);
    transform-origin: center;
    transition: transform .45s ease;
}

.hero-features.scroll-reveal.visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.feature-item {
    position: relative;
    border-radius: 12px;
    border-right-color: var(--home-divider);
    box-shadow: 0 0 0 rgba(50, 25, 28, 0);
    transition:
        opacity .55s ease,
        transform .35s ease,
        box-shadow .35s ease,
        background-color .35s ease;
}

.feature-item::before {
    position: absolute;
    top: -22px;
    right: 25px;
    left: 25px;
    height: 3px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--home-gold), var(--home-gold-light));
    content: "";
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform .35s ease;
}

.js .hero-features:not(.visible) .feature-item {
    opacity: 0;
    transform: translateY(24px);
}

.js .hero-features.visible .feature-item {
    opacity: 1;
    transform: translateY(0);
}

.feature-item:nth-child(1) {
    transition-delay: 0s;
}

.feature-item:nth-child(2) {
    transition-delay: .1s;
}

.feature-item:nth-child(3) {
    transition-delay: .2s;
}

.feature-item:nth-child(4) {
    transition-delay: .3s;
}

.feature-text strong {
    position: relative;
    width: fit-content;
}

.feature-text strong::after {
    position: absolute;
    right: 0;
    bottom: -3px;
    left: 0;
    height: 2px;
    border-radius: 2px;
    background: var(--home-gold);
    content: "";
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform .35s ease;
}

.feature-icon {
    translate: 0 0;
    transition:
        transform .35s ease,
        color .35s ease,
        background-color .35s ease;
}

.feature-item:focus-within {
    z-index: 1;
}

.feature-icon {
    border-radius: 14px;
    color: var(--home-maroon);
    background: linear-gradient(145deg, #fbf3df, #f1e4c5);
}

.feature-text strong {
    color: var(--home-text);
}

.feature-text span {
    color: var(--home-muted);
}

.feat-m-card {
    position: relative;
    overflow: hidden;
    border-color: rgba(201, 162, 75, .24);
    transition: transform .24s ease, box-shadow .24s ease;
}

.feat-m-card::before {
    position: absolute;
    top: 0;
    right: 14px;
    left: 14px;
    height: 3px;
    border-radius: 0 0 999px 999px;
    background: linear-gradient(90deg, var(--home-gold), var(--home-gold-light));
    content: "";
}

.feat-m-ic {
    border-radius: 14px;
    color: var(--home-maroon);
    background: #f5ead0;
}

.about {
    background: var(--home-cream);
}

.about .inner {
    padding: 100px 0 132px !important;
}

.about .cols {
    gap: clamp(36px, 6vw, 82px);
}

.about .photo {
    padding: 0 0 24px 24px;
}

.about .photo .frame {
    border: 2px solid var(--home-gold);
    border-radius: 24px;
}

.about .photo img {
    border-radius: 24px;
    box-shadow: 0 20px 46px rgba(60, 20, 25, .2);
}

.about .wrap > .cols > div:first-child > h2 {
    max-width: 600px;
    font-size: clamp(30px, 3.2vw, 38px) !important;
    line-height: 1.12 !important;
}

.about .wrap > .cols > div:first-child > div:first-child {
    font-size: 11px !important;
}

.about .wrap > .cols > div:first-child > p {
    font-size: 15px;
    line-height: 1.65;
}

.about .wrap > .cols > div:first-child > h3 {
    font-size: 20px !important;
}

.about .stat > div:first-child {
    font-size: 10px !important;
}

.about .stat > div:last-child {
    font-size: 14px !important;
}

.about .photo .chip > div:first-child {
    font-size: 14px !important;
}

.about .photo .chip > div:last-child {
    font-size: 10px !important;
}

.about .mcard h3 {
    font-size: 21px;
}

.about .mcard p {
    font-size: 14.5px;
    line-height: 1.6;
}

.about .wrap > .cols > div:first-child > div[style*="width:56px"] {
    width: 68px !important;
    height: 4px !important;
    background: linear-gradient(90deg, var(--home-gold), var(--home-gold-light)) !important;
}

.about .stat,
.about .mcard {
    border: 1px solid rgba(201, 162, 75, .2);
}

@media (min-width: 901px) {
    .hero-section {
        height: 660px;
    }

    .hero-content {
        padding-top: 148px;
        padding-bottom: 92px;
    }

    .hero-button {
        font-size: 11px;
    }

    .hero-buttons {
        margin-top: 44px;
    }

    .about .inner {
        padding-top: 156px !important;
    }
}

@media (max-width: 900px) {
    .hero-section {
        min-height: 660px;
    }

    .hero-section > .hero-overlay {
        background: linear-gradient(
            180deg,
            rgba(32, 28, 29, .02) 0%,
            rgba(32, 28, 29, .12) 38%,
            rgba(32, 22, 24, .76) 100%
        );
    }

    .hero-section .hero-left-panel {
        display: none;
    }

    .hero-section .hero-diagonal {
        display: none;
    }

    .hero-section::after {
        height: 42px;
    }

    .hero-features {
        bottom: -66px;
    }

    .about .inner {
        padding-top: 126px !important;
    }
}

@media (max-width: 760px) {
    .hero-section {
        min-height: 700px;
    }

    .hero-content {
        padding-bottom: 48px;
    }

    .hero-buttons {
        margin-top: 42px;
    }

    .hero-button {
        font-size: 11px;
    }

    .about .inner {
        padding: 64px 0 104px !important;
    }

    .about .cols {
        grid-template-columns: minmax(0, 1fr);
        gap: 42px;
    }

    .about .photo {
        width: min(100%, 620px);
        margin: 0 auto;
    }

    .about .mv {
        gap: 16px;
        margin-top: 42px;
    }

    .about .wrap > .cols > div:first-child > h2 {
        font-size: clamp(26px, 7vw, 32px) !important;
    }

    .about .wrap > .cols > div:first-child > p {
        font-size: 14px;
    }
}

@media (max-width: 520px) {
    .hero-section::after {
        height: 32px;
    }

    .about .mv {
        grid-template-columns: minmax(0, 1fr);
    }

    .about .mcard {
        gap: 14px;
        padding: 22px 18px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hero-text,
    .hero-features,
    .feature-item,
    .feat-m-card,
    .about .photo {
        animation: none !important;
    }

    .feature-item,
    .feat-m-card,
    .about .mcard,
    .public-nav-links .nav-button,
    .hero-button {
        transition: none !important;
    }

    .js .hero-features .feature-item,
    .js .hero-features:not(.visible) .feature-item {
        opacity: 1;
        transform: none;
    }

    .feature-icon {
        animation: none !important;
    }

    .hero-features.scroll-reveal,
    .hero-features.scroll-reveal.visible,
    .hero-features.scroll-reveal.visible:hover,
    .hero-features.scroll-reveal:active {
        opacity: 1;
        transform: translateX(-50%);
        transition: none !important;
    }

    .hero-features.scroll-reveal::before {
        transform: none;
        transition: none !important;
    }
}

.admin-staff-home .public-navbar,
.admin-staff-home .public-nav-container,
.admin-staff-home .public-logo-frame {
    transition: height .25s ease, box-shadow .25s ease, width .25s ease;
}

.admin-staff-home .public-navbar.scrolled {
    height: 64px;
    box-shadow: 0 7px 22px rgba(30, 20, 20, .24);
}

.admin-staff-home .public-navbar.scrolled .public-nav-container {
    height: 64px;
    min-height: 64px;
}

.admin-staff-home .public-navbar.scrolled .public-logo-frame {
    width: 64px;
    height: 64px;
    flex-basis: 64px;
    top: 0;
}

.admin-staff-home .mobile-menu-toggle,
.admin-staff-home #mobile-menu,
.admin-staff-home .menu-backdrop {
    display: none !important;
}

.admin-staff-home .hero-background {
    animation: admin-home-hero-zoom 12s ease-out 1 both;
    transform-origin: center;
}

.admin-staff-home .hero-text.scroll-reveal,
.admin-staff-home .hero-text.scroll-reveal:not(.visible) {
    opacity: 1;
    transform: none;
    transition: none;
}

.admin-staff-home .hero-text h1 .hero-phase-title {
    color: #fff;
    font-size: 1em;
    letter-spacing: -1.4px;
}

.admin-staff-home .hero-welcome,
.admin-staff-home .hero-phase-title,
.admin-staff-home .hero-association-title,
.admin-staff-home .hero-supporting-copy,
.admin-staff-home .hero-buttons {
    animation: admin-home-hero-copy-in .6s ease both;
}

.admin-staff-home .hero-welcome {
    animation-delay: 0s;
}

.admin-staff-home .hero-phase-title {
    animation-delay: .15s;
}

.admin-staff-home .hero-association-title {
    animation-delay: .3s;
}

.admin-staff-home .hero-supporting-copy {
    animation-delay: .45s;
}

.admin-staff-home .hero-buttons {
    animation-delay: .6s;
}

.admin-staff-home .hero-button.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 34px rgba(24, 12, 13, .38), inset 0 1px 0 #fff;
}

.admin-staff-home .hero-button.primary:hover .hero-button-arrow {
    transform: translateX(4px);
}

@keyframes admin-home-hero-copy-in {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes admin-home-hero-zoom {
    from {
        transform: scale(1);
    }

    to {
        transform: scale(1.06);
    }
}

@media (max-width: 900px) {
    .admin-staff-home .public-navbar {
        height: 72px;
        min-height: 72px;
        padding: 0 12px;
    }

    .admin-staff-home .public-navbar.scrolled {
        height: 64px;
        min-height: 64px;
    }

    .admin-staff-home .public-nav-container,
    .admin-staff-home .public-navbar.scrolled .public-nav-container {
        height: 72px;
        min-height: 72px;
        flex-direction: row;
        gap: 8px;
    }

    .admin-staff-home .public-navbar.scrolled .public-nav-container {
        height: 64px;
        min-height: 64px;
    }

    .admin-staff-home .public-brand {
        width: auto;
        flex: 1 1 0;
        justify-content: flex-start;
        gap: 7px;
    }

    .admin-staff-home .public-logo-frame,
    .admin-staff-home .public-navbar.scrolled .public-logo-frame {
        width: 50px;
        height: 50px;
        flex-basis: 50px;
    }

    .admin-staff-home .public-brand-text strong {
        font-size: clamp(9px, 2.7vw, 12px);
    }

    .admin-staff-home .public-brand-text span {
        font-size: clamp(7px, 2.2vw, 9px);
    }

    .admin-staff-home .public-nav-links {
        width: auto;
        height: 72px;
        flex: 0 0 auto;
        flex-wrap: nowrap;
        justify-content: flex-end;
        gap: 0;
        transform: none;
        display: flex;
    }

    .admin-staff-home .public-navbar.scrolled .public-nav-links {
        height: 64px;
    }

}

@media (prefers-reduced-motion: reduce) {
    .admin-staff-home *,
    .admin-staff-home *::before,
    .admin-staff-home *::after {
        animation: none !important;
        scroll-behavior: auto !important;
        transition: none !important;
    }

    .admin-staff-home .hero-background {
        transform: none;
    }

    .admin-staff-home .hero-text.scroll-reveal,
    .admin-staff-home .hero-text.scroll-reveal:not(.visible) {
        opacity: 1;
        transform: none;
    }

    .admin-staff-home .hero-button.primary:hover,
    .admin-staff-home .hero-button.primary:hover .hero-button-arrow {
        transform: none;
    }
}

/* About section: keep side gutters on tablets and phones (the padding shorthand above resets them). */
@media (max-width: 1276px) {
    .about .inner {
        padding-right: 24px !important;
        padding-left: 24px !important;
    }
}

@media (max-width: 760px) {
    .about .inner {
        padding-right: 16px !important;
        padding-left: 16px !important;
    }
}
