/* Custom Styles for khairil.web.id */

:root {
    --uni-navy: #015196;
    --uni-navy-dark: #0a2d4d;
    --uni-gold: #d97706;
    --uni-gold-dark: #b45309;
    --uni-cream: #FDFCF8;
    --uni-slate: #475569;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
}

body {
    overflow-x: hidden;
}

/* Preloader Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes scaleIn {
    from { transform: scaleX(0); }
    to { transform: scaleX(1); }
}

/* Responsive Typography Adjustments */
@media (max-width: 640px) {
    .font-serif.text-5xl { font-size: 2.5rem !important; }
    .font-serif.text-8xl { font-size: 3.25rem !important; }
    .font-serif.text-4xl { font-size: 2.25rem !important; }
    .py-32 { padding-top: 5rem !important; padding-bottom: 5rem !important; }
}

/* Form Transition Styles */
.step {
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.step.hidden {
    display: none;
    opacity: 0;
    pointer-events: none;
}

.step.active {
    display: block;
    opacity: 1;
    pointer-events: auto;
}

.vertical-text {
    writing-mode: vertical-rl;
    text-orientation: mixed;
}

/* Scroll Reveal */
[data-reveal] {
    opacity: 0;
    transform: translateY(30px);
    transition: all 1s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-reveal].visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- Advanced Premium Navbar --- */
#navbar {
    padding-top: 2rem;
    padding-bottom: 2rem;
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Scrolled / Floating State */
#navbar.scrolled {
    padding-top: 1.25rem;
    padding-bottom: 1.25rem;
}

#navbar .container::before {
    content: '';
    position: absolute;
    inset: 0.5rem 1rem;
    background: rgba(12, 19, 36, 0.02); /* Very subtle tint when transparent */
    backdrop-filter: blur(0px);
    border-radius: 100px;
    border: 1px solid rgba(255, 255, 255, 0);
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: -1;
    opacity: 0;
}

#navbar.scrolled .container::before {
    inset: 0.5rem 1.5rem;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px) saturate(180%);
    box-shadow: 
        0 4px 6px -1px rgba(0, 0, 0, 0.05),
        0 20px 40px -10px rgba(12, 19, 36, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.4);
    opacity: 1;
}

#navbar.scrolled {
    color: var(--uni-navy);
}

@media (max-width: 768px) {
    #navbar.scrolled .container::before {
        inset: 0.5rem 1rem;
        border-radius: 16px; /* Slightly more squarish on mobile for better space usage */
    }
}

/* Ensure Logo visibility when menu is open */
#navbar.menu-open {
    color: white !important;
}

#navbar.menu-open .container::before {
    opacity: 0 !important;
}

/* Custom Text Underline for Links */
.nav-link {
    position: relative;
    padding: 0.5rem 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background-color: var(--uni-gold);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* Hero Blend Effect */
.hero-gradient {
    background: linear-gradient(to right, rgba(12, 19, 36, 0.95), rgba(12, 19, 36, 0.5)), url('../images/hero-composite.png');
    background-size: cover;
    background-position: center;
}

/* Section Pillars Overlay */
.pillar-card {
    position: relative;
    overflow: hidden;
}

.pillar-card img {
    transition: transform 1.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.pillar-card:hover img {
    transform: scale(1.1);
}

/* Forms */
input::placeholder {
    color: #cbd5e1;
    font-size: 0.875rem;
}

input:focus + label,
input:not(:placeholder-shown) + label {
    color: var(--uni-gold);
}

/* Buttons Animation */
.btn-primary {
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--uni-gold);
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: -1;
}

.btn-primary:hover::before {
    transform: translateY(-100%);
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--uni-cream);
}

::-webkit-scrollbar-thumb {
    background: var(--uni-navy);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--uni-gold);
}

/* Header CTA Polishing */
.header-cta {
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

#navbar.scrolled .header-cta {
    background-color: var(--uni-navy);
    transform: scale(1.05);
    box-shadow: 0 10px 25px -5px rgba(1, 81, 150, 0.3);
}

#navbar.scrolled .header-cta:hover {
    background-color: var(--uni-gold);
    transform: scale(1.1);
    box-shadow: 0 15px 30px -5px rgba(217, 119, 6, 0.4);
}

/* Pulse hint for CTA */
@keyframes ctaPulse {
    0% { box-shadow: 0 0 0 0 rgba(217, 119, 6, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(217, 119, 6, 0); }
    100% { box-shadow: 0 0 0 0 rgba(217, 119, 6, 0); }
}

#navbar.scrolled .header-cta {
    animation: ctaPulse 2s infinite;
}

/* Visual Synergy Section Interactions */
.expertise-card {
    transition: all 0.7s cubic-bezier(0.16, 1, 0.3, 1);
    transform-origin: center;
}

#expertise-synergy:hover .expertise-card:not(:hover) {
    opacity: 0.25;
    filter: blur(2px) grayscale(100%);
    transform: scale(0.98);
}

.expertise-card:hover {
    opacity: 1 !important;
    filter: blur(0) grayscale(0) !important;
    transform: scale(1.02);
    z-index: 10;
}

/* Central Anchor Animation */
#expertise-synergy .xl\:flex .w-20 {
    transition: all 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

#expertise-synergy:hover .xl\:flex .w-20 {
    transform: rotate(180deg) scale(1.1);
    border-color: var(--uni-gold);
    box-shadow: 0 0 40px rgba(217, 119, 6, 0.2);
}

.signature {
    font-family: 'Birthstone', cursive;
    font-size: 4.5rem;
    color: var(--uni-gold);
    line-height: 1;
    transform: rotate(-5deg);
    display: inline-block;
}
a.logo-text {
    font-family: 'Birthstone', cursive;
    font-size: 2.5rem;
    color: var(--uni-gold);
    line-height: 1;
    transform: rotate(-2deg);
    display: inline-block;
}

/* Interactive Hero Text FX */
.text-tech:hover {
    color: #00f2ff !important;
    text-shadow: 0 0 20px rgba(0, 242, 255, 0.6);
    letter-spacing: 0.05em;
}

.text-organic:hover {
    color: #ffb347 !important;
    text-shadow: 0 0 20px rgba(255, 179, 71, 0.6);
    letter-spacing: 0.05em;
}
