html {
    min-height: 100%;
    overflow-y: auto;
    scroll-behavior: smooth;
    scroll-padding-top: 112px;
    overscroll-behavior-y: auto;
}

body {
    min-height: 100%;
    font-family: 'Plus Jakarta Sans', sans-serif;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    overflow-y: auto;
    background-color: #0F172A;
    overscroll-behavior-y: auto;
    touch-action: pan-y;
}

/* Fallbacks for custom Tailwind theme colors. These keep contrast stable even if CDN utilities load late. */
.bg-akay-dark {
    background-color: #0f172a !important;
}

.bg-akay-primary {
    background-color: #15803d !important;
}

.bg-akay-light {
    background-color: #22c55e !important;
}

.bg-akay-accent {
    background-color: #eab308 !important;
}

.bg-akay-surface {
    background-color: #f8fafc !important;
}

.text-akay-dark {
    color: #0f172a !important;
}

.text-akay-primary {
    color: #15803d !important;
}

.text-akay-light {
    color: #22c55e !important;
}

.text-akay-accent {
    color: #eab308 !important;
}

.border-akay-primary {
    border-color: #15803d !important;
}

.border-akay-accent {
    border-color: #eab308 !important;
}

.bg-akay-primary\/10 {
    background-color: rgba(21, 128, 61, 0.1) !important;
}

.bg-akay-primary\/20 {
    background-color: rgba(21, 128, 61, 0.2) !important;
}

.bg-akay-primary\/30 {
    background-color: rgba(21, 128, 61, 0.3) !important;
}

.bg-akay-primary\/50 {
    background-color: rgba(21, 128, 61, 0.5) !important;
}

.bg-akay-light\/20 {
    background-color: rgba(34, 197, 94, 0.2) !important;
}

.bg-akay-dark\/80 {
    background-color: rgba(15, 23, 42, 0.8) !important;
}

.bg-akay-dark\/90 {
    background-color: rgba(15, 23, 42, 0.9) !important;
}

.border-akay-primary\/30 {
    border-color: rgba(21, 128, 61, 0.3) !important;
}

.from-akay-dark,
.from-akay-dark\/95 {
    --tw-gradient-from: rgba(15, 23, 42, 0.95) var(--tw-gradient-from-position) !important;
    --tw-gradient-to: rgba(15, 23, 42, 0) var(--tw-gradient-to-position) !important;
    --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to) !important;
}

.via-akay-dark\/80 {
    --tw-gradient-to: rgba(15, 23, 42, 0) var(--tw-gradient-to-position) !important;
    --tw-gradient-stops: var(--tw-gradient-from), rgba(15, 23, 42, 0.8) var(--tw-gradient-via-position), var(--tw-gradient-to) !important;
}

.to-akay-dark {
    --tw-gradient-to: #0f172a var(--tw-gradient-to-position) !important;
}

.from-akay-light {
    --tw-gradient-from: #22c55e var(--tw-gradient-from-position) !important;
    --tw-gradient-to: rgba(34, 197, 94, 0) var(--tw-gradient-to-position) !important;
    --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to) !important;
}

.to-akay-accent {
    --tw-gradient-to: #eab308 var(--tw-gradient-to-position) !important;
}

.from-akay-primary\/0 {
    --tw-gradient-from: rgba(21, 128, 61, 0) var(--tw-gradient-from-position) !important;
    --tw-gradient-to: rgba(21, 128, 61, 0) var(--tw-gradient-to-position) !important;
    --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to) !important;
}

.via-akay-primary\/50 {
    --tw-gradient-to: rgba(21, 128, 61, 0) var(--tw-gradient-to-position) !important;
    --tw-gradient-stops: var(--tw-gradient-from), rgba(21, 128, 61, 0.5) var(--tw-gradient-via-position), var(--tw-gradient-to) !important;
}

.to-akay-primary\/0 {
    --tw-gradient-to: rgba(21, 128, 61, 0) var(--tw-gradient-to-position) !important;
}

.site-readable-dark {
    position: relative;
    isolation: isolate;
    background: linear-gradient(135deg, #0f172a 0%, #020617 100%) !important;
    color: #f8fafc !important;
}

.site-readable-dark::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(2, 6, 23, 0.92));
}

.site-readable-dark > * {
    position: relative;
    z-index: 2;
}

.site-readable-dark img {
    opacity: 0.08 !important;
    filter: grayscale(1) contrast(0.85) !important;
}

.site-readable-dark h1,
.site-readable-dark h2,
.site-readable-dark h3,
.site-readable-dark h4,
.site-readable-dark summary {
    color: #ffffff !important;
}

.site-readable-dark p,
.site-readable-dark span {
    color: rgba(248, 250, 252, 0.78);
}

.site-experience-card {
    background: linear-gradient(135deg, #0f172a 0%, #064e3b 100%) !important;
    color: #ffffff !important;
    border: 1px solid rgba(34, 197, 94, 0.25) !important;
    box-shadow: 0 24px 50px rgba(15, 23, 42, 0.28) !important;
}

.site-experience-card .counter {
    color: #86efac !important;
    text-shadow: 0 2px 18px rgba(34, 197, 94, 0.28);
}

.site-experience-card span:last-child {
    color: rgba(255, 255, 255, 0.86) !important;
}

[data-aos] {
    transition-duration: 320ms !important;
}

[data-aos][data-aos][data-aos-delay] {
    transition-delay: 0ms !important;
}

@media (max-width: 767px) {
    [data-aos] {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
}

html.is-scroll-locked,
body.is-scroll-locked {
    overflow: hidden !important;
}

@supports (height: 100svh) {
    body {
        min-height: 100svh;
    }
}

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #1e293b;
}

::-webkit-scrollbar-thumb {
    background: #475569;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #cbd5e1;
}

/* Standard first viewport for content pages. The homepage slider keeps its own full-screen frame. */
body > section:first-of-type:not(.site-home-hero) {
    min-height: clamp(560px, 86svh, 860px);
    height: auto !important;
    padding-top: clamp(7rem, 13vh, 10rem);
    padding-bottom: clamp(3rem, 8vh, 6rem);
}

body > section:first-of-type:not(.site-home-hero) > .container,
body > section:first-of-type:not(.site-home-hero) > .relative.z-10 {
    width: 100%;
}

@media (max-width: 767px) {
    html {
        scroll-padding-top: 88px;
    }

    body > section:first-of-type:not(.site-home-hero) {
        min-height: min(760px, 88svh);
        padding-top: 6.75rem;
        padding-bottom: 3rem;
    }

    body > section:first-of-type h1 {
        overflow-wrap: anywhere;
    }
}

/* Mega menu */
.mega-menu {
    transform: translateY(10px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    display: block;
}

.group:hover .mega-menu,
.mega-menu:hover {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* Header */
#main-header {
    transition: background-color 0.4s ease, box-shadow 0.4s ease, padding 0.4s ease;
}

#main-header:not(.scrolled) {
    background: linear-gradient(to bottom, rgba(15, 23, 42, 0.98) 0%, rgba(15, 23, 42, 0.6) 100%);
    padding-top: 0;
    padding-bottom: 0;
}

#main-header:not(.scrolled) #top-bar {
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

#main-header:not(.scrolled) #nav-bar {
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    padding-top: 0.8rem;
    padding-bottom: 0.8rem;
}

@media (min-width: 1024px) {
    #main-header:not(.scrolled) #nav-bar {
        padding-top: 1rem;
        padding-bottom: 1rem;
    }
}

#main-header.scrolled {
    background-color: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(16px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.08);
    padding-top: 0;
    padding-bottom: 0;
}

#main-header.scrolled #nav-bar {
    border-bottom: 1px solid #e2e8f0;
    padding-top: 0.8rem;
    padding-bottom: 0.8rem;
}

@media (min-width: 1024px) {
    #main-header.scrolled #nav-bar {
        padding-top: 0.8rem;
        padding-bottom: 0.8rem;
    }
}

#main-header.scrolled .nav-text {
    color: #334155;
}

#main-header.scrolled .nav-text:hover {
    color: #15803d;
}

#main-header:not(.scrolled) .nav-text {
    color: white;
}

#main-header.scrolled .logo-white {
    display: none !important;
}

#main-header.scrolled .logo-color {
    display: flex !important;
}

#main-header:not(.scrolled) .logo-white {
    display: flex !important;
}

#main-header:not(.scrolled) .logo-color {
    display: none !important;
}

#top-bar {
    transition: max-height 0.4s ease, opacity 0.4s ease, border-bottom 0.4s ease;
    max-height: 50px;
    overflow: hidden;
}

#main-header.scrolled #top-bar {
    max-height: 0;
    opacity: 0;
    border-bottom: 0;
}

/* Infinite marquee */
.marquee-container {
    width: 100%;
    overflow: hidden;
    position: relative;
}

.marquee-content {
    display: flex;
    width: max-content;
    animation: marquee-scroll 40s linear infinite;
}

@keyframes marquee-scroll {
    0% {
        transform: translate3d(0, 0, 0);
    }
    100% {
        transform: translate3d(-50%, 0, 0);
    }
}

.mobile-accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.mobile-accordion-content.open {
    max-height: 800px;
}

.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.no-scrollbar::-webkit-scrollbar {
    display: none;
}
