/* ==========================================================================
   ONE Rehabilitation Center — 1center.refit.sa
   Main menu ported from REFIT, re-skinned to the ONE Center teal identity.
   ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Anton&family=Cairo:wght@300..1000&family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,400&display=swap');

@font-face {
    font-family: 'Hacen';
    src: url('../fonts/Hacen%20Maghreb%20Lt.ttf') format('truetype');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
    unicode-range: U+0600-06FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FEFC;
}

@font-face {
    font-family: 'Hacen';
    src: url('../fonts/Hacen%20Maghreb.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
    unicode-range: U+0600-06FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FEFC;
}

@font-face {
    font-family: 'Hacen';
    src: url('../fonts/Hacen%20Maghreb%20Bd.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
    unicode-range: U+0600-06FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FEFC;
}

:root {
    /* ONE Center Brand Colors */
    --color-primary: #00786C;   /* Healing Teal (primary) */
    --color-accent: #009090;    /* Teal accent */
    --color-deep: #003C3C;      /* Deep Pine Green */
    --color-highlight: #E9C46A; /* Sandy Gold */
    --color-mint: #5FC9BA;      /* Soft mint */
    --color-coral: #EE8869;     /* Coral accent */
    --gold-bright: #F2D58A;     /* Luminous sandy gold for sheen/accents */
    --hero-bg: #042624;         /* Deep teal-ink backdrop */
    --color-dark: #0A1F1D;      /* Ink — body text & deep backgrounds */
    --color-light: #F2FAF8;     /* Calming mint-white */
    --color-white: #FFFFFF;

    /* Typography */
    --font-heading: 'Hacen', 'Poppins', sans-serif;
    --font-body: 'Hacen', 'Poppins', sans-serif;
    --font-arabic: 'Hacen', sans-serif;

    /* Shadows & Transitions */
    --shadow-sm: 0 4px 20px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.1);
    --shadow-glow: 0 0 20px rgba(0, 144, 144, 0.4);
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-medium: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    color: var(--color-dark);
    background-color: var(--color-light);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* ==========================================================================
   Main Header — Premium Dark Animated Menu (ONE Center teal skin)
   ========================================================================== */
.main-header {
    position: fixed;
    left: 0;
    width: 100%;
    z-index: 1000;
    top: -110px;
    animation: headerDrop 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.1s forwards;
    transition: box-shadow 0.5s ease;
}

@keyframes headerDrop { to { top: 0; } }

/* Glass layer */
.main-header::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(180deg, rgba(4, 38, 36, 0.86) 0%, rgba(4, 38, 36, 0.15) 100%);
    backdrop-filter: blur(14px) saturate(140%);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
    transition: background 0.5s ease;
}

/* Gold hairline along the bottom edge (appears on scroll) */
.main-header::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(233, 196, 106, 0.7) 50%, transparent);
    transform: scaleX(0);
    transition: transform 0.8s ease;
    z-index: 1;
}

.main-header.scrolled::before { background: rgba(3, 30, 29, 0.94); }
.main-header.scrolled { box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45); }
.main-header.scrolled::after { transform: scaleX(1); }

.nav-container {
    max-width: 1340px;
    margin: 0 auto;
    padding: 0 3rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 92px;
    transition: height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.main-header.scrolled .nav-container { height: 74px; }

/* ---- Animated Logo ---- */
.logo {
    display: flex;
    align-items: center;
    -webkit-tap-highlight-color: transparent;
}

.logo-frame {
    position: relative;
    display: block;
    height: 70px;
    opacity: 0;
    transform: translateY(-14px) scale(0.82);
    filter: blur(6px);
    animation: logoIn 1.1s cubic-bezier(0.16, 1, 0.3, 1) 0.35s forwards;
    transition: height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.main-header.scrolled .logo-frame { height: 54px; }

@keyframes logoIn { to { opacity: 1; transform: none; filter: blur(0); } }

.logo-img {
    height: 100%;
    width: auto;
    display: block;
    filter: drop-shadow(0 4px 16px rgba(0, 144, 144, 0.45));
    animation: logoFloat 5s ease-in-out 1.5s infinite;
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes logoFloat {
    0%, 100% { transform: translateY(0);    filter: drop-shadow(0 4px 16px rgba(0, 144, 144, 0.45)); }
    50%      { transform: translateY(-4px); filter: drop-shadow(0 9px 24px rgba(233, 196, 106, 0.5)); }
}

.logo:hover .logo-img { transform: scale(1.07) rotate(-1deg); }

/* Gold glint that sweeps across the logo silhouette */
.logo-shine {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(115deg, transparent 38%, rgba(255, 255, 255, 0.85) 48%, rgba(233, 196, 106, 0.95) 52%, transparent 62%);
    background-size: 280% 100%;
    background-repeat: no-repeat;
    -webkit-mask: url('../images/logo-white.png') center / contain no-repeat;
    mask: url('../images/logo-white.png') center / contain no-repeat;
    mix-blend-mode: screen;
    animation: logoShine 6s ease-in-out 2.2s infinite;
}

@keyframes logoShine {
    0%   { background-position: 190% 0; }
    22%  { background-position: -90% 0; }
    100% { background-position: -90% 0; }
}

/* ---- Desktop Menu ---- */
.nav-menu {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-item {
    opacity: 0;
    transform: translateY(-10px);
    animation: navIn 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    animation-delay: calc(var(--i, 0) * 0.08s + 0.5s);
}

@keyframes navIn { to { opacity: 1; transform: none; } }

.nav-link {
    position: relative;
    display: inline-block;
    overflow: hidden;
    height: 1.45em;
    line-height: 1.45em;
    padding: 0.2rem 0;
    font-size: 1.08rem;
    font-weight: 700;
    letter-spacing: 0.3px;
    color: #BFE3DC;
}

.nav-link span {
    display: block;
    transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

/* gold duplicate that rolls up on hover */
.nav-link::before {
    content: attr(data-text);
    position: absolute;
    left: 0;
    top: 0.2rem;
    color: var(--gold-bright);
    transform: translateY(140%);
    transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-link:hover span { transform: translateY(-140%); }
.nav-link:hover::before { transform: translateY(0); }

/* gold underline grows from the start edge */
.nav-link::after {
    content: '';
    position: absolute;
    inset-inline-start: 0;
    bottom: -2px;
    width: 100%;
    height: 2px;
    transform: scaleX(0);
    transform-origin: inline-start;
    background: linear-gradient(90deg, var(--color-highlight), var(--gold-bright));
    transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-link:hover::after { transform: scaleX(1); }

/* ---- Actions (Right Side) ---- */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    opacity: 0;
    animation: navIn 0.7s cubic-bezier(0.16, 1, 0.3, 1) 1s forwards;
}

.lang-switch {
    font-family: var(--font-arabic);
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    color: #BFE3DC;
    padding: 0.35rem 0.85rem;
    border: 1px solid rgba(233, 196, 106, 0.45);
    border-radius: 40px;
    transition: color 0.3s ease, background 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
}

.lang-switch:hover {
    color: var(--hero-bg);
    background: var(--gold-bright);
    border-color: var(--gold-bright);
    transform: translateY(-1px);
}

/* ---- CTA Button ---- */
.btn {
    display: inline-block;
    padding: 0.8rem 1.8rem;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-align: center;
    letter-spacing: 0.3px;
}

.btn-glow {
    position: relative;
    overflow: hidden;
    background: linear-gradient(120deg, var(--color-primary), var(--color-accent));
    background-size: 200% 200%;
    color: var(--color-white);
    border: none;
    box-shadow: 0 6px 22px rgba(0, 120, 108, 0.45);
    animation: gradientShift 6s ease infinite;
}

.btn-glow span { position: relative; z-index: 1; }

.btn-glow::after {
    content: '';
    position: absolute;
    top: 0;
    left: -70%;
    width: 45%;
    height: 100%;
    background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.5), transparent);
    transform: skewX(-20deg);
    transition: left 0.6s ease;
}

.btn-glow:hover::after { left: 130%; }

@keyframes gradientShift {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.btn-glow:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(0, 144, 144, 0.55);
}

/* mobile-only actions block lives in the overlay */
.nav-cta-mobile { display: none; }

/* ---- Hamburger ---- */
.hamburger {
    display: none;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0.5rem;
    z-index: 1100;
}

.bar {
    display: block;
    width: 26px;
    height: 2px;
    margin: 6px auto;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background-color: var(--gold-bright);
    border-radius: 2px;
}

/* ==========================================================================
   Responsive — Full-Screen Animated Mobile Overlay
   ========================================================================== */
@media (max-width: 992px) {
    .nav-container { padding: 0 1.4rem; }

    .nav-actions { display: none; }

    /* Shrink the wide horizontal logo so it never bleeds off-screen */
    .logo-frame, .main-header.scrolled .logo-frame { height: 50px; }

    .hamburger { display: block; }

    /* Morphing Hamburger to 'X' */
    .hamburger.active .bar:nth-child(1) { transform: translateY(8px) rotate(45deg); }
    .hamburger.active .bar:nth-child(2) { opacity: 0; }
    .hamburger.active .bar:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

    /* Overlay revealed with a circular wipe from the hamburger corner */
    .nav-menu {
        position: fixed;
        inset: 0;
        gap: 0;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        background:
            radial-gradient(120% 80% at 78% 8%, rgba(0, 120, 108, 0.42), transparent 58%),
            radial-gradient(100% 70% at 10% 100%, rgba(95, 201, 186, 0.22), transparent 60%),
            rgba(4, 26, 25, 0.98);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        clip-path: circle(0% at calc(100% - 42px) 42px);
        transition: clip-path 0.65s cubic-bezier(0.76, 0, 0.24, 1);
        padding: 2rem;
    }

    /* RTL: hamburger sits on the left, so wipe origin flips */
    [dir="rtl"] .nav-menu { clip-path: circle(0% at 42px 42px); }
    [dir="rtl"] .nav-menu.active { clip-path: circle(150% at 42px 42px); }

    .nav-menu.active { clip-path: circle(150% at calc(100% - 42px) 42px); }

    .nav-item {
        margin: 0.4rem 0;
        width: auto;
        text-align: center;
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
        animation: none;
    }

    .nav-menu.active .nav-item { opacity: 1; transform: none; }

    .nav-menu.active .nav-item:nth-child(1) { transition-delay: 0.16s; }
    .nav-menu.active .nav-item:nth-child(2) { transition-delay: 0.22s; }
    .nav-menu.active .nav-item:nth-child(3) { transition-delay: 0.28s; }
    .nav-menu.active .nav-item:nth-child(4) { transition-delay: 0.34s; }
    .nav-menu.active .nav-item:nth-child(5) { transition-delay: 0.40s; }
    .nav-menu.active .nav-item:nth-child(6) { transition-delay: 0.46s; }
    .nav-menu.active .nav-item:nth-child(7) { transition-delay: 0.52s; }
    .nav-menu.active .nav-item:nth-child(8) { transition-delay: 0.58s; }
    .nav-menu.active .nav-cta-mobile { transition-delay: 0.66s; }

    /* Big display links; disable the desktop roll-up effect */
    .nav-link {
        display: inline-block;
        overflow: visible;
        height: auto;
        line-height: 1.1;
        font-family: var(--font-heading);
        font-size: clamp(1.9rem, 7.5vw, 2.7rem);
        font-weight: 700;
        letter-spacing: 0.3px;
        color: #EAF7F3;
        padding: 0.3rem 0;
    }
    .nav-link span { transform: none !important; }
    .nav-link::before { display: none; }
    .nav-link::after { bottom: 0; height: 3px; }

    /* Actions inside the overlay */
    .nav-cta-mobile {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 1.1rem;
        margin-top: 1.6rem;
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    }
    .nav-menu.active .nav-cta-mobile { opacity: 1; transform: none; }

    .nav-cta-mobile .btn { font-size: 1rem; padding: 0.95rem 2.4rem; }
    .nav-cta-mobile .lang-switch { font-size: 1.1rem; }

    /* Lock scroll while the overlay is open */
    body.menu-open { overflow: hidden; }
}

/* ==========================================================================
   Hero Slider — full-bleed, teal cinematic, mobile-centered subjects
   ========================================================================== */
.hero-slider {
    position: relative;
    width: 100%;
    height: 100vh;
    min-height: 580px;
    overflow: hidden;
    background-color: var(--hero-bg);
}

.slider-container { position: relative; width: 100%; height: 100%; }

.slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 1.1s ease-in-out;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    text-align: center;
}

.slide.active { opacity: 1; z-index: 1; }

/* Ken Burns slow zoom; object-position:center keeps the subject on mobile crop */
.slide-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    z-index: -2;
    transform: scale(1.08);
    transition: transform 7s ease-out;
}

.slide.active .slide-bg { transform: scale(1); }

.slide-overlay {
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(circle at 50% 36%, rgba(0, 120, 108, 0.30) 0%, rgba(4, 32, 30, 0.55) 62%),
        linear-gradient(180deg, rgba(4, 32, 30, 0.55) 0%, rgba(4, 32, 30, 0.18) 38%, rgba(4, 32, 30, 0.93) 100%);
}

.slide-content {
    width: 100%;
    min-width: 0;           /* defeat flex item min-width:auto so the cap applies */
    max-width: min(840px, 92vw);
    padding: 0 1.5rem clamp(90px, 14vh, 160px);
    color: var(--color-white);
    z-index: 2;
}

.slide-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    font-weight: 700;
    letter-spacing: 1px;
    font-size: 0.95rem;
    color: var(--gold-bright);
    margin-bottom: 1rem;
    opacity: 0;
}
.slide-kicker::before, .slide-kicker::after {
    content: '';
    width: 26px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--gold-bright));
}
.slide-kicker::after { background: linear-gradient(90deg, var(--gold-bright), transparent); }

.slide-title {
    font-family: var(--font-heading);
    font-size: clamp(1.9rem, 6vw, 4.6rem);
    line-height: 1.14;
    margin-bottom: 1rem;
    text-shadow: 0 6px 26px rgba(0, 0, 0, 0.45);
    overflow-wrap: break-word;
    opacity: 0;
}
.slide-title .hl { color: var(--gold-bright); }

.slide-subtitle {
    font-size: clamp(1.05rem, 2vw, 1.45rem);
    margin-bottom: 2.2rem;
    font-weight: 400;
    color: #E6F4F0;
    max-width: 36ch;
    margin-inline: auto;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
    opacity: 0;
}

.slide-content .btn-glow { opacity: 0; }

/* Staggered entrance each time a slide becomes active */
.slide.active .slide-kicker   { animation: slideRise 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.35s forwards; }
.slide.active .slide-title    { animation: slideRise 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.50s forwards; }
.slide.active .slide-subtitle { animation: slideRise 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.68s forwards; }
.slide.active .slide-content .btn-glow { animation: slideRise 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.86s forwards; }

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

/* Controls */
.slider-controls {
    position: absolute;
    top: 50%;
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 1.5rem;
    transform: translateY(-50%);
    z-index: 10;
    pointer-events: none;
}

.slider-btn {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: var(--color-white);
    width: 52px;
    height: 52px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-medium);
    pointer-events: auto;
}

.slider-btn:hover {
    background: var(--color-primary);
    border-color: var(--color-primary);
    transform: scale(1.1);
}

/* Dots */
.slider-dots {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: var(--transition-medium);
}

.dot.active, .dot:hover { background: var(--gold-bright); transform: scale(1.25); }

@media (max-width: 992px) {
    .slide-content { padding-bottom: clamp(110px, 16vh, 160px); }
    .slider-btn { width: 44px; height: 44px; font-size: 1.2rem; }
}

@media (prefers-reduced-motion: reduce) {
    .slide-bg { transform: none !important; }
    .slide.active .slide-kicker,
    .slide.active .slide-title,
    .slide.active .slide-subtitle,
    .slide.active .slide-content .btn-glow { animation: none; opacity: 1; }
}

/* ==========================================================================
   Placeholder hero (so the page isn't blank under the fixed header)
   ========================================================================== */
.page-hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 8rem 1.5rem 4rem;
    background:
        radial-gradient(120% 90% at 50% 0%, rgba(0, 120, 108, 0.18), transparent 60%),
        radial-gradient(90% 70% at 80% 100%, rgba(95, 201, 186, 0.16), transparent 60%),
        var(--color-light);
}

.page-hero h1 {
    font-family: var(--font-heading);
    font-size: clamp(1.8rem, 6vw, 4rem);
    color: var(--color-deep);
    line-height: 1.25;
    margin-bottom: 1rem;
    max-width: 14ch;
    overflow-wrap: break-word;
}

.page-hero p {
    font-size: clamp(1rem, 2.5vw, 1.3rem);
    color: var(--color-primary);
    max-width: min(640px, 92vw);
    margin: 0 auto 2rem;
}

.page-hero .btn-glow { padding: 1rem 2.6rem; font-size: 1.05rem; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }
    .main-header { top: 0; }
    .logo-frame, .nav-item, .nav-actions { opacity: 1; transform: none; filter: none; }
}

/* ==========================================================================
   Premium Animated Footer — ONE Center teal skin
   ========================================================================== */
.site-footer {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(120% 80% at 50% -10%, rgba(0, 120, 108, 0.30), transparent 55%),
        linear-gradient(180deg, #03201E 0%, #042624 60%, #021816 100%);
    color: #BBD7D0;
    padding: 6rem 0 1.5rem;
    isolation: isolate;
}

/* Top hairline */
.site-footer::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 1px;
    background: linear-gradient(90deg, transparent, rgba(233, 196, 106, 0.5) 50%, transparent);
}

/* --- Drifting aurora --- */
.footer-aurora { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.footer-aurora .blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(70px);
    opacity: 0.5;
    will-change: transform;
}
.blob-1 { width: 460px; height: 460px; top: -120px; left: -80px; background: radial-gradient(circle, #00786C, transparent 70%); animation: blobDrift 18s ease-in-out infinite; }
.blob-2 { width: 520px; height: 520px; top: 10%; right: -140px; background: radial-gradient(circle, #5FC9BA, transparent 70%); animation: blobDrift 22s ease-in-out infinite reverse; }
.blob-3 { width: 380px; height: 380px; bottom: -120px; left: 38%; background: radial-gradient(circle, #E9C46A, transparent 70%); opacity: 0.26; animation: blobDrift 26s ease-in-out infinite; }

@keyframes blobDrift {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33%      { transform: translate(60px, -40px) scale(1.12); }
    66%      { transform: translate(-50px, 30px) scale(0.92); }
}

.footer-inner {
    position: relative;
    z-index: 1;
    max-width: 1340px;
    margin: 0 auto;
    padding: 0 3rem;
}

/* --- Scroll reveal --- */
.site-footer .reveal {
    opacity: 0;
    transform: translateY(42px);
    transition: opacity 0.8s ease, transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}
.site-footer.in-view .reveal { opacity: 1; transform: none; }
.site-footer.in-view .footer-grid .f-col:nth-child(1) { transition-delay: 0.05s; }
.site-footer.in-view .footer-grid .f-col:nth-child(2) { transition-delay: 0.14s; }
.site-footer.in-view .footer-grid .f-col:nth-child(3) { transition-delay: 0.23s; }
.site-footer.in-view .footer-grid .f-col:nth-child(4) { transition-delay: 0.32s; }
.site-footer.in-view .footer-wordmark { transition-delay: 0.2s; }

/* --- CTA --- */
.footer-cta { text-align: center; margin-bottom: 4.5rem; }
.footer-eyebrow {
    font-size: 0.8rem; font-weight: 700; letter-spacing: 3px;
    text-transform: uppercase; color: var(--gold-bright);
    margin-bottom: 1rem;
}
.footer-headline {
    font-family: var(--font-heading);
    font-size: clamp(2.6rem, 6vw, 5rem);
    font-weight: 800; line-height: 1.05; color: #fff;
    margin-bottom: 2rem;
}
.footer-headline .grad {
    background: linear-gradient(110deg, var(--color-accent), var(--color-mint) 40%, var(--gold-bright) 90%);
    background-size: 220% 100%;
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent; color: transparent;
    animation: gradMove 6s ease infinite;
}
@keyframes gradMove { 0%,100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }

.footer-join {
    position: relative;
    display: inline-flex; align-items: center; gap: 0.9rem;
    padding: 1.05rem 2.2rem;
    border-radius: 50px;
    font-weight: 700; font-size: 1.02rem; letter-spacing: 0.5px;
    color: #fff;
    background: linear-gradient(120deg, var(--color-primary), var(--color-accent));
    box-shadow: 0 10px 34px rgba(0, 120, 108, 0.5);
    overflow: hidden;
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
    will-change: transform;
}
.footer-join::after {
    content: ''; position: absolute; top: 0; left: -70%;
    width: 45%; height: 100%;
    background: linear-gradient(120deg, transparent, rgba(255,255,255,0.55), transparent);
    transform: skewX(-20deg);
    transition: left 0.6s ease;
}
.footer-join:hover::after { left: 130%; }
.footer-join:hover { box-shadow: 0 16px 44px rgba(0, 144, 144, 0.6); }
.join-label, .join-arrow { position: relative; z-index: 1; display: inline-flex; }
.join-arrow { transition: transform 0.3s ease; }
.footer-join:hover .join-arrow { transform: translateX(5px); }

/* --- Live clock pill --- */
.footer-status {
    display: inline-flex; align-items: center; gap: 0.55rem;
    margin-top: 1.6rem; padding: 0.5rem 1.1rem;
    border: 1px solid rgba(233, 196, 106, 0.25);
    border-radius: 40px;
    font-size: 0.85rem; letter-spacing: 0.5px; color: #CFE6E0;
    background: rgba(255, 255, 255, 0.02);
}
.pulse-dot {
    width: 9px; height: 9px; border-radius: 50%;
    background: var(--color-mint);
    box-shadow: 0 0 0 0 rgba(95, 201, 186, 0.7);
    animation: pulseDot 2s infinite;
}
@keyframes pulseDot {
    0%   { box-shadow: 0 0 0 0 rgba(95, 201, 186, 0.7); }
    70%  { box-shadow: 0 0 0 9px rgba(95, 201, 186, 0); }
    100% { box-shadow: 0 0 0 0 rgba(95, 201, 186, 0); }
}
.status-sep { opacity: 0.4; }
.status-clock { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--gold-bright); }
.status-tz { opacity: 0.7; }

/* --- Link grid --- */
.footer-grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr 1fr 1.4fr;
    gap: 3rem 2rem;
    padding-bottom: 3rem;
}
.f-col h4 {
    font-size: 0.78rem; font-weight: 700; letter-spacing: 2.5px;
    text-transform: uppercase; color: #fff; margin-bottom: 1.3rem;
}
.f-col ul li { margin-bottom: 0.85rem; }
.f-col ul a {
    position: relative;
    color: #9FBFB8; font-size: 0.96rem;
    transition: color 0.3s ease, padding-inline-start 0.3s ease;
}
.f-col ul a::before {
    content: ''; position: absolute; inset-inline-start: -14px; top: 50%;
    width: 7px; height: 1.5px; background: var(--gold-bright);
    transform: translateY(-50%) scaleX(0); transform-origin: inline-start;
    transition: transform 0.3s ease;
}
.f-col ul a:hover { color: #fff; padding-inline-start: 14px; }
.f-col ul a:hover::before { transform: translateY(-50%) scaleX(1); }

.f-logo img { height: 76px; width: auto; margin-bottom: 1.2rem; filter: drop-shadow(0 6px 18px rgba(0, 144, 144, 0.4)); }
.f-tagline { font-size: 0.95rem; line-height: 1.7; color: #8FB0A9; max-width: 320px; margin-bottom: 1.5rem; }

.f-socials { display: flex; gap: 0.7rem; }
.f-social {
    display: grid; place-items: center;
    width: 42px; height: 42px; border-radius: 50%;
    color: #CFE6E0;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.03);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.3s ease, color 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.f-social:hover {
    transform: translateY(-4px);
    color: var(--hero-bg);
    background: var(--gold-bright);
    border-color: var(--gold-bright);
    box-shadow: 0 8px 22px rgba(233, 196, 106, 0.45);
}

/* contact column */
.f-addr { font-size: 0.95rem; line-height: 1.7; color: #8FB0A9; margin-bottom: 1rem; }
.f-phone {
    display: inline-block; font-size: 1.15rem; font-weight: 700; color: #fff;
    margin-bottom: 1.4rem; transition: color 0.3s ease;
}
.f-phone:hover { color: var(--gold-bright); }

.f-news {
    display: flex; align-items: center;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 40px; padding: 4px 4px 4px 18px;
    max-width: 320px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.f-news:focus-within { border-color: var(--gold-bright); box-shadow: 0 0 0 4px rgba(233, 196, 106, 0.15); }
.f-news input {
    flex: 1; min-width: 0; background: none; border: none; outline: none;
    color: #fff; font-size: 0.92rem; font-family: var(--font-body);
}
.f-news input::placeholder { color: #6E8E87; }
.f-news button {
    display: grid; place-items: center;
    width: 42px; height: 42px; border-radius: 50%; border: none; cursor: pointer;
    color: #fff; background: linear-gradient(120deg, var(--color-primary), var(--color-accent));
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.f-news button:hover { transform: scale(1.08); box-shadow: 0 6px 18px rgba(0, 144, 144, 0.5); }
.f-news-msg { font-size: 0.85rem; color: var(--gold-bright); margin-top: 0.7rem; min-height: 1.1em; }

/* --- Kinetic wordmark --- */
.footer-wordmark {
    margin: 3rem 0 1.5rem;
    text-align: center;
    line-height: 0.78;
    overflow: hidden;
    cursor: default;
}
.footer-wordmark .wm {
    display: inline-block;
    font-family: 'Anton', sans-serif;
    font-size: clamp(5rem, 26vw, 22rem);
    letter-spacing: 0.04em;
    background:
        radial-gradient(circle 24vw at var(--mx, 50%) var(--my, 45%), rgba(214, 247, 240, 0.95), rgba(214, 247, 240, 0) 55%),
        linear-gradient(110deg, #0c3b36 0%, #00786C 28%, #5FC9BA 50%, #00786C 72%, #0c3b36 100%);
    background-size: 100% 100%, 220% 100%;
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent; color: transparent;
    animation: wmSheen 7s linear infinite;
}
@keyframes wmSheen {
    0%   { background-position: 0 0, -110% 0; }
    100% { background-position: 0 0, 110% 0; }
}

/* --- Bottom bar --- */
.footer-bottom {
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
    gap: 1rem;
    padding-top: 1.8rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 0.85rem; color: #6E8E87;
}
.footer-bottom-links { display: flex; gap: 1.6rem; }
.footer-bottom-links a { color: #6E8E87; transition: color 0.3s ease; }
.footer-bottom-links a:hover { color: var(--gold-bright); }
.back-top {
    display: inline-flex; align-items: center; gap: 0.5rem;
    background: none; border: 1px solid rgba(255, 255, 255, 0.14);
    color: #BBD7D0; cursor: pointer;
    padding: 0.5rem 1rem; border-radius: 40px;
    font-size: 0.82rem; letter-spacing: 1px; text-transform: uppercase;
    transition: all 0.3s ease;
}
.back-top svg { transition: transform 0.3s ease; }
.back-top:hover { color: var(--hero-bg); background: var(--gold-bright); border-color: var(--gold-bright); }
.back-top:hover svg { transform: translateY(-3px); }

/* --- Footer responsive --- */
@media (max-width: 992px) {
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 2.5rem; }
    .f-brand { grid-column: 1 / -1; }
}
@media (max-width: 576px) {
    .site-footer { padding-top: 4rem; }
    .footer-inner { padding: 0 1.4rem; }
    .footer-grid { grid-template-columns: 1fr; }
    .footer-bottom { flex-direction: column; text-align: center; }
    .footer-wordmark .wm { font-size: 32vw; }
}

@media (prefers-reduced-motion: reduce) {
    .footer-aurora .blob,
    .footer-headline .grad,
    .footer-wordmark .wm,
    .pulse-dot { animation: none !important; }
    .site-footer .reveal { opacity: 1; transform: none; }
}
