/* ===================================
   SPRnesia - Global Stylesheet (FIXED)
   Digunakan di semua halaman
   ================================ */

/* Google Fonts */
@import url("https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@300;400;500;600;700&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap");

/* ===== CSS RESET ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #FAFAF9;
    color: #2C2C2C;
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    -webkit-tap-highlight-color: transparent;
}

/* Prevent text size adjustment on orientation change */
html {
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
}

/* Improve touch target size */
button, a, input, select, textarea {
    touch-action: manipulation;
    min-height: 44px;
    min-width: 44px;
}

/* Prevent double-tap zoom on buttons and links */
button, a {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* ===== CSS VARIABLES ===== */
:root {
    /* Colors */
    --color-primary: #2C2C2C;
    --color-secondary: #6B7280;
    --color-accent: #3A6B35;
    --color-bronze: #B8956A;
    --color-white: #FFFFFF;
    --color-off-white: #FAFAF9;
    --color-light-gray: #F5F5F4;
    --color-border: #E5E5E5;
    
    /* Typography */
    --font-serif: 'Cormorant Garamond', serif;
    --font-sans: 'Inter', sans-serif;
    
    /* Spacing */
    --section-padding: 120px;
    --container-padding: 5%;
    
    /* Header */
    --header-height: 80px;
    
    /* Transitions */
    --transition-smooth: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.25s ease;
    
    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.12);
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-serif);
    font-weight: 400;
    line-height: 1.2;
    color: var(--color-primary);
}

h1 { font-size: clamp(2.5rem, 5vw, 4.5rem); }
h2 { font-size: clamp(2rem, 4vw, 3.5rem); }
h3 { font-size: clamp(1.5rem, 3vw, 2.25rem); }
h4 { font-size: clamp(1.25rem, 2.5vw, 1.75rem); }

p {
    font-family: var(--font-sans);
    font-size: 1rem;
    line-height: 1.8;
    color: var(--color-secondary);
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-fast);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ===== UTILITY CLASSES ===== */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 80px;
}

.section-header.centered {
    margin-bottom: 60px;
}

.section-label {
    display: inline-block;
    font-family: var(--font-sans);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--color-accent);
    margin-bottom: 20px;
}

.section-title {
    margin-bottom: 24px;
    letter-spacing: -0.5px;
}

.section-description {
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--color-secondary);
}

.section-cta {
    text-align: center;
    margin-top: 60px;
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 36px;
    font-family: var(--font-sans);
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    border: none;
    cursor: pointer;
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
    min-height: 52px;
}

.btn-primary {
    background: var(--color-primary);
    color: var(--color-white);
}

.btn-primary:hover {
    background: var(--color-accent);
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: transparent;
    color: var(--color-primary);
    border: 1px solid var(--color-primary);
}

.btn-secondary:hover {
    background: var(--color-primary);
    color: var(--color-white);
    transform: translateY(-3px);
}

.btn-light {
    background: var(--color-white);
    color: var(--color-primary);
}

.btn-light:hover {
    background: var(--color-primary);
    color: var(--color-white);
    transform: translateY(-3px);
}

.btn-outline {
    background: transparent;
    color: var(--color-white);
    border: 1px solid var(--color-white);
}

.btn-outline:hover {
    background: var(--color-white);
    color: var(--color-primary);
}

.btn-text {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-sans);
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: var(--color-primary);
    transition: var(--transition-fast);
}

.btn-text:hover {
    gap: 12px;
    color: var(--color-accent);
}

.btn-text i {
    transition: var(--transition-fast);
}

.btn-full {
    width: 100%;
    justify-content: center;
    padding: 18px 36px;
    font-size: 1rem;
}

.btn-full i {
    font-size: 24px;
}

/* ===== HEADER & NAVIGATION ===== */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px var(--container-padding);
    background: transparent;
    transition: var(--transition-smooth);
}

header.scrolled {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    padding: 16px var(--container-padding);
}

.logo {
    display: flex;
    align-items: center;
    z-index: 1002;
    position: relative;
}

.logo img {
    height: 50px;
    width: auto;
    transition: opacity 0.3s ease;
}

.white-logo {
    display: block;
}

.black-logo {
    display: none;
}

header.scrolled .white-logo {
    display: none;
}

header.scrolled .black-logo {
    display: block;
}

/* Desktop Navigation */
nav {
    display: block;
}

.navbar {
    display: flex;
    align-items: center;
    gap: 40px;
}

.navbar a {
    font-family: var(--font-sans);
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    color: var(--color-white);
    padding: 8px 0;
    position: relative;
    min-height: auto;
    min-width: auto;
}

.navbar a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-accent);
    transition: width 0.3s ease;
}

.navbar a:hover::after,
.navbar a.active::after {
    width: 100%;
}

header.scrolled .navbar a {
    color: var(--color-primary);
}

header.scrolled .navbar a:hover {
    color: var(--color-accent);
}

/* Menu Icon */
#menu-icon {
    display: none;
    font-size: 32px;
    color: var(--color-white);
    cursor: pointer;
    z-index: 1002;
    transition: var(--transition-fast);
    position: relative;
}

header.scrolled #menu-icon {
    color: var(--color-primary);
}

#menu-icon.bx-x {
    transform: rotate(90deg);
}

/* ===== FOOTER ===== */
.footer {
    background: #1A1A1A;
    color: var(--color-white);
    padding: 80px 0 40px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 2fr;
    gap: 60px;
    margin-bottom: 60px;
}

.footer-logo {
    font-family: var(--font-serif);
    font-size: 1.75rem;
    font-weight: 400;
    margin-bottom: 16px;
}

.footer-col h3{
    color: var(--color-white);
}

.footer-logo span {
    color: var(--color-accent);
}

.footer-tagline {
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.8;
    margin-bottom: 24px;
}

.footer-social {
    display: flex;
    gap: 16px;
}

.footer-social a {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: var(--color-white);
    transition: var(--transition-fast);
}

.footer-social a:hover {
    background: var(--color-accent);
    border-color: var(--color-accent);
    transform: translateY(-3px);
}

.footer-col h4 {
    font-family: var(--font-sans);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 24px;
    color: var(--color-white);
}

.footer-col ul {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-col ul li a {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    transition: var(--transition-fast);
    display: inline-block;
}

.footer-col ul li a:hover {
    color: var(--color-accent);
    padding-left: 5px;
}

.contact-item {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
}

.contact-item i {
    font-size: 20px;
    color: var(--color-accent);
    flex-shrink: 0;
    margin-top: 2px;
}

.contact-item strong {
    display: block;
    color: var(--color-white);
    margin-bottom: 4px;
    font-weight: 600;
}

.contact-item p,
.contact-item a {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    line-height: 1.6;
}

.contact-item a:hover {
    color: var(--color-accent);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    flex-wrap: wrap;
    gap: 20px;
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.875rem;
}

.footer-bottom-links {
    display: flex;
    gap: 24px;
}

.footer-bottom-links a {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.875rem;
    transition: var(--transition-fast);
}

.footer-bottom-links a:hover {
    color: var(--color-accent);
}

/* ===== BACK TO TOP ===== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--color-primary);
    color: var(--color-white);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-smooth);
    z-index: 999;
    box-shadow: var(--shadow-md);
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: var(--color-accent);
    transform: translateY(-5px);
}

/* ===== ANIMATION UTILITIES ===== */
[data-aos] {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

/* ===== RESPONSIVE DESIGN ===== */

/* Tablet Large - 992px */
@media (max-width: 992px) {
    :root {
        --section-padding: 80px;
        --container-padding: 4%;
    }

    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 40px;
    }
}

/* Tablet - 768px */
@media (max-width: 768px) {
    :root {
        --section-padding: 60px;
        --header-height: 70px;
    }
    
    html {
        scroll-padding-top: 70px;
    }

    /* MOBILE MENU - FIXED */
    #menu-icon {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    nav {
        position: fixed;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100vh;
        height: 100dvh; /* Dynamic viewport height for mobile */
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(20px);
        display: flex;
        align-items: center;
        justify-content: center;
        transition: left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 1001;
        overflow-y: auto;
    }

    nav.active {
        left: 0;
    }

    .navbar {
        flex-direction: column;
        gap: 0;
        width: 100%;
        padding: 80px 0 40px;
    }

    .navbar a {
        padding: 20px 40px;
        width: 100%;
        text-align: center;
        font-size: 1.25rem;
        color: var(--color-primary) !important;
        border-bottom: 1px solid var(--color-border);
        min-height: 64px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .navbar a::after {
        display: none;
    }

    .navbar a:hover,
    .navbar a.active {
        background: var(--color-light-gray);
        color: var(--color-accent) !important;
    }

    .section-header {
        margin-bottom: 50px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
    
    .btn {
        padding: 14px 28px;
        font-size: 0.85rem;
    }
}

/* Mobile - 576px */
@media (max-width: 576px) {
    :root {
        --section-padding: 50px;
        --container-padding: 5%;
    }

    header {
        padding: 16px var(--container-padding);
    }
    
    header.scrolled {
        padding: 12px var(--container-padding);
    }

    .logo img {
        height: 40px;
    }

    .back-to-top {
        width: 45px;
        height: 45px;
        bottom: 20px;
        right: 20px;
        font-size: 20px;
    }
    
    .section-header {
        margin-bottom: 40px;
    }
    
    .section-label {
        font-size: 0.7rem;
        letter-spacing: 2px;
    }
    
    .section-description {
        font-size: 1rem;
    }
    
    .btn {
        padding: 12px 24px;
        font-size: 0.8rem;
    }
    
    .footer {
        padding: 60px 0 30px;
    }
    
    .footer-logo {
        font-size: 1.5rem;
    }
    
    .footer-col h4 {
        font-size: 0.95rem;
        margin-bottom: 20px;
    }
    
    .footer-col ul li a {
        font-size: 0.85rem;
    }
    
    .contact-item {
        margin-bottom: 20px;
    }
    
    .contact-item i {
        font-size: 18px;
    }
    
    .contact-item strong {
        font-size: 0.9rem;
    }
    
    .contact-item p,
    .contact-item a {
        font-size: 0.85rem;
    }
    
    .footer-bottom {
        padding-top: 30px;
        gap: 15px;
    }
    
    .footer-bottom p,
    .footer-bottom-links a {
        font-size: 0.8rem;
    }
    
    .navbar a {
        font-size: 1.1rem;
        padding: 18px 30px;
    }
}

/* Extra small devices - 375px */
@media (max-width: 375px) {
    :root {
        --section-padding: 40px;
    }
    
    .logo img {
        height: 36px;
    }
    
    .navbar a {
        font-size: 1rem;
        padding: 16px 20px;
    }
    
    .footer-social a {
        width: 40px;
        height: 40px;
    }
}