@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600&family=Playfair+Display:ital,wght@0,600;0,700;1,600&display=swap');

/* =========================================
   MelfordWorks Design System
   ========================================= */
:root {
  --navy: #0A192F;
  --navy-light: #112240;
  --navy-lighter: #233554;
  --gold: #C99B3B;
  --gold-hover: #b0852f;
  --teal: #2A9D8F;
  --teal-hover: #21867a;
  --cream: #F8F5EE;
  --text-main: #E6F1FF;
  --text-muted: #8892B0;
  --white: #FFFFFF;
  --font-heading: 'Playfair Display', serif;
  --font-body: 'Inter', sans-serif;
  --max-width: 1200px;
  --transition: all 0.3s ease;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: var(--font-body); background-color: var(--navy); color: var(--text-main); line-height: 1.6; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
h1, h2, h3, h4 { font-family: var(--font-heading); font-weight: 600; line-height: 1.2; }
a { text-decoration: none; color: inherit; transition: var(--transition); }
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 2rem; }
.section-padding { padding: 6rem 0; }
.text-center { text-align: center; }

.eyebrow { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 2px; color: var(--gold); font-weight: 600; margin-bottom: 1rem; display: block; }
.title-xl { font-size: clamp(2.5rem, 5vw, 4rem); margin-bottom: 1.5rem; }
.title-lg { font-size: clamp(2rem, 4vw, 3rem); margin-bottom: 1.5rem; }
.subtitle { font-size: 1.25rem; color: var(--text-muted); max-width: 700px; margin-bottom: 3rem; }
.text-gold { color: var(--gold); }
.text-teal { color: var(--teal); }

.btn { display: inline-block; padding: 1rem 2rem; font-size: 1rem; font-weight: 600; border-radius: 4px; cursor: pointer; transition: var(--transition); border: 2px solid transparent; }
.btn-primary { background-color: var(--gold); color: var(--navy); }
.btn-primary:hover { background-color: var(--gold-hover); transform: translateY(-2px); }
.btn-secondary { background-color: transparent; border-color: var(--teal); color: var(--teal); }
.btn-secondary:hover { background-color: var(--teal); color: var(--white); }

/* =========================================
   NAVIGATION
   ========================================= */
.navbar { 
    position: fixed; top: 0; left: 0; width: 100%; 
    padding: 1.5rem 0; z-index: 1000; 
    background: rgba(10, 25, 47, 0.95); 
    backdrop-filter: blur(10px); 
    border-bottom: 1px solid rgba(255,255,255,0.05); 
    transition: var(--transition); 
}
.navbar .container { display: flex; justify-content: space-between; align-items: center; }
.logo { font-family: var(--font-heading); font-size: 1.5rem; font-weight: 700; letter-spacing: 1px; z-index: 1001; }
.logo span { color: var(--gold); }
.nav-links { display: flex; gap: 2rem; list-style: none; align-items: center; }
.nav-links a { font-size: 0.95rem; font-weight: 400; }
.nav-links a:hover { color: var(--teal); }

/* Hamburger Icon (hidden on desktop) */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    z-index: 1001;
    padding: 5px;
}
.hamburger span {
    display: block;
    width: 26px;
    height: 3px;
    background-color: var(--text-main);
    transition: var(--transition);
    border-radius: 2px;
}

/* =========================================
   HERO & LAYOUT
   ========================================= */
.hero { 
    min-height: 100vh; 
    display: flex; 
    align-items: center; 
    background: linear-gradient(rgba(10, 25, 47, 0.85), rgba(10, 25, 47, 0.95)), url('/assets/img/hero-bg.jpg') no-repeat center center/cover !important;
    padding-top: 80px; 
    position: relative; 
    overflow: hidden; 
}
.hero-content { max-width: 800px; position: relative; z-index: 1; }
.hero-actions { display: flex; gap: 1rem; margin-top: 2rem; flex-wrap: wrap; }

.page-header { background: var(--navy-light); padding-top: 10rem; padding-bottom: 5rem; border-bottom: 1px solid rgba(255,255,255,0.05); }

.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; }
.card { background: var(--navy-light); padding: 2.5rem; border-radius: 8px; border-top: 3px solid var(--gold); transition: var(--transition); }
.card:hover { transform: translateY(-5px); box-shadow: 0 10px 30px rgba(0,0,0,0.3); }
.card h3 { font-size: 1.5rem; margin-bottom: 1rem; color: var(--white); }
.card p { color: var(--text-muted); font-size: 0.95rem; }
.card.teal-border { border-top-color: var(--teal); }

.img-rounded { width: 100%; height: auto; border-radius: 8px; box-shadow: 0 10px 30px rgba(0,0,0,0.5); border: 1px solid rgba(255,255,255,0.1); }

.method-flow { display: flex; justify-content: space-between; align-items: stretch; gap: 1rem; margin-top: 4rem; flex-wrap: wrap; }
.chevron-step { flex: 1; min-width: 180px; background: var(--navy-light); padding: 2rem 1.5rem; position: relative; border-left: 4px solid var(--teal); transition: var(--transition); }
.chevron-step:nth-child(even) { border-left-color: var(--gold); }
.chevron-step:hover { background: var(--navy-lighter); }
.chevron-step h4 { color: var(--gold); font-size: 1.1rem; margin-bottom: 0.5rem; text-transform: uppercase; letter-spacing: 1px; font-family: var(--font-body); }
.chevron-step p { font-size: 0.85rem; color: var(--text-muted); }

.ascend-grid { display: flex; justify-content: center; gap: 1.5rem; flex-wrap: wrap; margin-top: 3rem; }
.ascend-circle { width: 120px; height: 120px; border-radius: 50%; display: flex; flex-direction: column; justify-content: center; align-items: center; background: var(--gold); color: var(--navy); font-weight: 700; text-align: center; padding: 1rem; }
.ascend-circle span { font-size: 1.8rem; font-family: var(--font-heading); line-height: 1; margin-bottom: 5px;}
.ascend-circle small { font-size: 0.65rem; text-transform: uppercase; letter-spacing: 1px; line-height: 1.2; }
.ascend-circle.teal { background: var(--teal); color: var(--white); }

/* =========================================
   ANIMATIONS
   ========================================= */

/* Fade-in: visible by default (no-JS safe) */
.fade-in {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.9s cubic-bezier(0.25, 1, 0.5, 1),
                transform 0.9s cubic-bezier(0.25, 1, 0.5, 1);
    will-change: opacity, transform;
}
/* Only start hidden when JS is active */
body.js-loaded .fade-in {
    opacity: 0;
    transform: translateY(30px);
}
body.js-loaded .fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Word-by-word reveal */
.reveal-text span {
    display: inline-block;
    white-space: pre;
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 0.6s cubic-bezier(0.25, 1, 0.5, 1),
                transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}
body.js-loaded .reveal-text.visible span {
    opacity: 1;
    transform: translateY(0);
}

/* Typing cursor for data-type headings */
.cursor {
    display: inline-block;
    color: var(--gold);
    font-weight: 300;
    animation: blink 0.8s step-end infinite;
    margin-left: 2px;
}
@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* =========================================
   FOOTER
   ========================================= */
footer { background: var(--navy-light); padding: 4rem 0 2rem; border-top: 1px solid rgba(255,255,255,0.05); margin-top: 4rem; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 4rem; margin-bottom: 3rem; }
.footer-grid h4 { color: var(--white); margin-bottom: 1.5rem; }
.footer-grid ul { list-style: none; }
.footer-grid ul li { margin-bottom: 0.8rem; }
.footer-grid ul a { color: var(--text-muted); font-size: 0.9rem; }
.footer-grid ul a:hover { color: var(--gold); }
.footer-bottom { text-align: center; padding-top: 2rem; border-top: 1px solid rgba(255,255,255,0.05); color: var(--text-muted); font-size: 0.85rem; }

/* =========================================
   RESPONSIVE — MOBILE
   ========================================= */
@media (max-width: 768px) {
    /* Show hamburger */
    .hamburger {
        display: flex;
    }

    /* Hide nav by default on mobile */
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--navy-light);
        flex-direction: column;
        padding: 2rem;
        gap: 1.5rem;
        border-bottom: 1px solid var(--navy-lighter);
        box-shadow: 0 15px 30px rgba(0,0,0,0.5);
    }

    /* When active, show */
    .nav-links.active {
        display: flex;
    }

    .nav-links li { width: 100%; text-align: center; }
    .nav-links .btn { width: 100%; display: block; padding: 0.9rem !important; }

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

    .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
    .method-flow { flex-direction: column; }
    .hero-actions { flex-direction: column; }
    .hero-actions .btn { width: 100%; text-align: center; }
    .grid-2 { grid-template-columns: 1fr; gap: 2rem; }
    .section-padding { padding: 4rem 0; }
    .container { padding: 0 1.25rem; }
}



/* =========================================
   TYPEWRITER (data-type)
   ========================================= */
[data-type] .tw-char {
    opacity: 0;
    transition: opacity 0.15s linear;
    display: inline-block;
}
[data-type] .tw-char.on {
    opacity: 1;
}

/* If someone has "reduce motion", show everything instantly */
@media (prefers-reduced-motion: reduce) {
    [data-type] .tw-char {
        opacity: 1 !important;
        transition: none !important;
    }
}




/* =========================================
   WHATSAPP BUTTONS
   ========================================= */
.btn-whatsapp {
    background-color: #25D366;
    color: #fff;
    border-color: #25D366;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.btn-whatsapp:hover {
    background-color: #20b85a;
    border-color: #20b85a;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(37, 211, 102, 0.3);
}

.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 999;
    background-color: #25D366;
    color: #fff;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    transition: all 0.3s ease;
    animation: pulse-wa 2s infinite;
}
.whatsapp-float:hover {
    transform: scale(1.1) translateY(-3px);
    box-shadow: 0 8px 30px rgba(37, 211, 102, 0.6);
}

@keyframes pulse-wa {
    0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7); }
    70% { box-shadow: 0 0 0 15px rgba(37, 211, 102, 0); }
    100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

/* Hide the floating button on very small screens if it overlaps content */
@media (max-width: 768px) {
    .whatsapp-float {
        width: 55px;
        height: 55px;
        bottom: 20px;
        right: 20px;
    }
}
