@import url('https://fonts.googleapis.com/css2?family=Staatliches&family=Outfit:wght@300;400;600;700&display=swap');

:root {
    --bg-primary: #FDFCF0;
    --bg-secondary: #EBF7F6;
    --bg-card: rgba(255, 255, 255, 0.7);
    --primary-teal: #096A61;
    --primary-yellow: #FDD746;
    --accent-teal: #4FD1C5;
    --text-main: #1A202C;
    --text-muted: #4A5568;
    --transition-smooth: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.05);
    --max-width: 1200px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

/* ===== PARALLAX BG LAYERS ===== */
.parallax-bg {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 120%;
    z-index: -2;
    pointer-events: none;
}

.layer-deep {
    position: absolute; inset: 0;
    background:
        radial-gradient(ellipse 80% 50% at 20% 20%, rgba(9,106,97,0.06) 0%, transparent 60%),
        radial-gradient(ellipse 60% 40% at 80% 80%, rgba(253,215,70,0.07) 0%, transparent 60%),
        #FDFCF0;
    will-change: transform;
}

.layer-mid {
    position: absolute; inset: 0;
    will-change: transform;
    overflow: hidden;
}
.layer-mid::before {
    content: '';
    position: absolute;
    top: 10%; right: -5%;
    width: 500px; height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(9,106,97,0.05) 0%, transparent 70%);
}
.layer-mid::after {
    content: '';
    position: absolute;
    bottom: 20%; left: -5%;
    width: 400px; height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(253,215,70,0.08) 0%, transparent 70%);
}

.layer-orbs { position: absolute; inset: 0; will-change: transform; }

.orb {
    position: absolute;
    border-radius: 50%;
    animation: orbFloat linear infinite;
}
.orb-1 { width:300px;height:300px;top:15%;left:5%; background:radial-gradient(circle at 40% 40%,rgba(9,106,97,0.08),transparent 70%); animation-duration:25s; }
.orb-2 { width:200px;height:200px;top:60%;right:8%; background:radial-gradient(circle at 40% 40%,rgba(253,215,70,0.1),transparent 70%); animation-duration:18s;animation-direction:reverse; }
.orb-3 { width:150px;height:150px;top:35%;right:25%; background:radial-gradient(circle at 40% 40%,rgba(79,209,197,0.07),transparent 70%); animation-duration:22s; }

@keyframes orbFloat {
    0%   { transform:translate(0,0) scale(1); }
    25%  { transform:translate(15px,-20px) scale(1.05); }
    50%  { transform:translate(30px,10px) scale(0.95); }
    75%  { transform:translate(-10px,20px) scale(1.02); }
    100% { transform:translate(0,0) scale(1); }
}

.layer-grid {
    position: absolute; inset: 0;
    background-image:
        linear-gradient(rgba(9,106,97,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(9,106,97,0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    will-change: transform;
}

#particles-js {
    position: fixed; top:0; left:0;
    width:100%; height:100%;
    z-index: -1;
}

/* ===== BASE TYPOGRAPHY ===== */
h1, h2, h3, .heading-font {
    font-family: 'Staatliches', cursive;
    text-transform: uppercase;
    letter-spacing: 2px;
}
a { transition: var(--transition-smooth); text-decoration: none; color: inherit; }
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 2rem; }
section { padding: 8rem 0; position: relative; }

/* ===== HERO TITLE — MARKER DRAW ===== */
.hero-title {
    font-size: clamp(4rem, 10vw, 8rem);
    line-height: 0.9;
    margin-bottom: 1.5rem;
    color: var(--text-main);
    position: relative;
}

.hero-title .char {
    display: inline-block;
    opacity: 0;
    clip-path: inset(0 100% 0 0);
    animation: markerDraw 0.07s cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
}

@keyframes markerDraw {
    0%   { opacity:1; clip-path: inset(0 100% 0 0); }
    100% { opacity:1; clip-path: inset(0 0% 0 0); }
}

.hero-title::after {
    content: '';
    position: absolute;
    bottom: -8px; left: 0;
    width: 0; height: 4px;
    background: var(--primary-teal);
    border-radius: 2px;
    animation: underlineDraw 0.5s ease forwards;
    animation-delay: 1.6s;
}

@keyframes underlineDraw { to { width: 100%; } }

/* ===== HERO PRETITLE — TYPEWRITER ===== */
.hero-pretitle {
    color: var(--primary-teal);
    font-weight: 700;
    margin-bottom: 1rem;
    display: block;
    overflow: hidden;
    white-space: nowrap;
    width: 0;
    animation: typewriter 0.5s steps(12,end) forwards;
    animation-delay: 0.1s;
}
@keyframes typewriter { to { width: 7ch; } }

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--text-muted);
    margin-bottom: 3rem;
    max-width: 600px;
    opacity: 0;
    animation: fadeUp 0.6s ease forwards;
    animation-delay: 1.7s;
}

.hero-btns {
    position: relative; z-index: 2;
    opacity: 0; transform: translateY(20px);
    animation: fadeUp 0.6s ease forwards;
    animation-delay: 2s;
}

@keyframes fadeUp { to { opacity:1; transform:translateY(0); } }

/* ===== BOUNCING SECTION HEADINGS ===== */
.bounce-heading .b-char {
    display: inline-block;
}
.bounce-heading.bouncing .b-char {
    animation: charBounce 0.55s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}
@keyframes charBounce {
    0%   { transform:translateY(0) scaleY(1); }
    20%  { transform:translateY(-20px) scaleY(1.1); }
    40%  { transform:translateY(6px) scaleY(0.9); }
    60%  { transform:translateY(-10px) scaleY(1.05); }
    80%  { transform:translateY(3px) scaleY(0.97); }
    100% { transform:translateY(0) scaleY(1); }
}

/* ===== GLASS CARDS ===== */
.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: var(--shadow-soft);
    transition: var(--transition-smooth);
}
.glass-card:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 0 30px 60px rgba(9,106,97,0.15), inset 0 1px 0 rgba(255,255,255,0.5);
    border-color: var(--primary-teal);
}
.glass-card i { transition: var(--transition-smooth); }
.glass-card:hover i { transform: rotate(10deg) scale(1.2); color: var(--primary-yellow); }

.service-icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    color: var(--primary-teal);
    position: relative;
    display: inline-block;
}
.service-icon::after {
    content: '';
    position: absolute; inset: -10px;
    border-radius: 50%;
    border: 2px solid var(--primary-teal);
    opacity: 0; transform: scale(0.6);
    transition: all 0.4s ease;
}
.glass-card:hover .service-icon::after { opacity: 0.3; transform: scale(1); }

/* ===== BUTTONS ===== */
.btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    font-family: 'Staatliches', cursive;
    font-size: 1.2rem;
    letter-spacing: 1px;
    cursor: pointer;
    transition: var(--transition-smooth);
    border: none;
    position: relative;
    z-index: 2;
    overflow: hidden;
}
.btn::after {
    content: '';
    position: absolute; inset: 0;
    background: rgba(255,255,255,0.2);
    transform: translateX(-100%) skewX(-20deg);
    transition: transform 0.4s ease;
    border-radius: inherit;
}
.btn:hover::after { transform: translateX(100%) skewX(-20deg); }
.btn-primary { background-color: var(--primary-teal); color: white; }
.btn-primary:hover { background-color:#0d8a7e; transform:scale(1.05) translateY(-2px); box-shadow:0 8px 25px rgba(9,106,97,0.4); }
.btn-secondary { background-color: var(--primary-yellow); color: var(--text-main); }
.btn-secondary:hover { background-color:#fccc2e; transform:scale(1.05) translateY(-2px); box-shadow:0 8px 25px rgba(253,215,70,0.4); }

/* ===== NAV ===== */
nav {
    position: fixed; top:0; width:100%;
    padding: 1.5rem 0; z-index:1000;
    transition: var(--transition-smooth);
}
nav.scrolled {
    background: rgba(253,252,240,0.85);
    backdrop-filter: blur(12px);
    padding: 1rem 0;
    box-shadow: 0 5px 20px rgba(0,0,0,0.07);
}
.nav-content { display:flex; justify-content:space-between; align-items:center; }
.logo {
    font-family:'Staatliches',cursive; font-size:1.8rem;
    color: var(--primary-teal);
    transition: var(--transition-smooth);
}
.logo:hover { letter-spacing:4px; }
.nav-links { display:flex; gap:2.5rem; align-items:center; }
.nav-links a {
    font-weight:600; font-size:0.9rem;
    text-transform:uppercase; letter-spacing:1px;
    position: relative;
}
.nav-links a::after {
    content:''; position:absolute; bottom:-3px; left:0;
    width:0; height:2px; background:var(--primary-teal);
    transition: width 0.3s ease;
}
.nav-links a:hover::after { width:100%; }
.nav-links a:hover { color:var(--primary-teal); }

/* ===== HERO ===== */
.hero {
    min-height:100vh; display:flex; align-items:center;
    padding-top:120px; padding-bottom:150px; position:relative;
}
.hero-content { max-width:800px; position:relative; z-index:2; }
.hero-btns { position:relative; z-index:2; }

/* ===== FLOATING BADGES ===== */
.floating-badge {
    position:absolute;
    padding:0.4rem 0.9rem;
    background:rgba(255,255,255,0.85);
    backdrop-filter:blur(8px);
    border:1px solid rgba(9,106,97,0.15);
    border-radius:30px;
    font-size:0.8rem; font-weight:600;
    color: var(--primary-teal);
    pointer-events:none; z-index:1;
    white-space:nowrap;
    box-shadow:0 4px 12px rgba(0,0,0,0.06);
    opacity:0; transform:translateY(10px);
}
.badge-1 { top:18%; right:8%;  animation: floatBadge 4s ease-in-out infinite, badgeIn 0.5s ease forwards 2.2s; }
.badge-2 { top:42%; right:5%;  animation: floatBadge 5s ease-in-out infinite 0.8s, badgeIn 0.5s ease forwards 2.5s; }
.badge-3 { top:64%; right:12%; animation: floatBadge 3.5s ease-in-out infinite 1.6s, badgeIn 0.5s ease forwards 2.8s; }
@keyframes badgeIn  { to { opacity:1; transform:translateY(0); } }
@keyframes floatBadge {
    0%,100% { transform:translateY(0) rotate(-1deg); }
    50%      { transform:translateY(-10px) rotate(1deg); }
}

/* ===== REVEAL ===== */
.reveal {
    opacity:0; transform:translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s cubic-bezier(0.22,1,0.36,1);
}
.reveal.active { opacity:1; transform:translateY(0); }

/* ===== TIMELINE ===== */
.timeline { position:relative; padding:2rem 0; }
.timeline::before {
    content:''; position:absolute;
    left:50%; transform:translateX(-50%);
    width:2px; height:0;
    background:var(--primary-teal); opacity:0.2;
    transition:height 1.5s ease;
}
.timeline.line-active::before { height:100%; }
.timeline-item { margin-bottom:4rem; width:100%; display:flex; justify-content:space-between; align-items:center; }
.timeline-content { width:45%; position:relative; }
.timeline-content::before {
    content:''; position:absolute; top:50%;
    width:14px; height:14px; border-radius:50%;
    background:var(--primary-teal);
    border:3px solid var(--bg-primary);
    transform:translateY(-50%) scale(0);
    transition: transform 0.4s cubic-bezier(0.34,1.56,0.64,1) 0.3s;
}
.timeline-item:nth-child(odd)  .timeline-content::before { right:-8%; }
.timeline-item:nth-child(even) .timeline-content::before { left:-8%; }
.timeline-item.active .timeline-content::before {
    transform:translateY(-50%) scale(1);
    animation: dotPulse 2s ease-out infinite 0.5s;
}
@keyframes dotPulse {
    0%   { box-shadow:0 0 0 0 rgba(9,106,97,0.4); }
    70%  { box-shadow:0 0 0 10px rgba(9,106,97,0); }
    100% { box-shadow:0 0 0 0 rgba(9,106,97,0); }
}
.timeline-item:nth-child(even) { flex-direction:row-reverse; }
.timeline-date { font-family:'Staatliches',cursive; color:var(--primary-teal); font-size:1.5rem; margin-bottom:0.5rem; }
.services-grid { display:flex; justify-content:center; gap:2rem; flex-wrap:wrap; }

/* ===== WAVE ===== */
.wave-container {
    position:absolute; width:100%; height:150px;
    bottom:-1px; left:0; line-height:0;
    pointer-events:none; z-index:1;
}
.wave-container svg { position:relative; display:block; width:calc(100% + 1.3px); height:150px; }

/* ===== SECTION HEADING UNDERLINE ===== */
.section-heading { display:inline-block; position:relative; }
.section-heading::after {
    content:''; position:absolute; bottom:-6px; left:0;
    width:0; height:3px;
    background:var(--primary-yellow); border-radius:2px;
    transition: width 0.9s ease 0.2s;
}
.section-heading.active::after { width:100%; }

/* ===== SCROLL PROGRESS ===== */
.scroll-progress {
    position:fixed; top:0; left:0; height:3px;
    background:var(--primary-teal); z-index:9999;
    width:0%; transition:width 0.1s linear;
    box-shadow:0 0 8px rgba(9,106,97,0.5);
}

/* ===== CURSOR ===== */
.cursor-dot {
    width:8px; height:8px;
    background:var(--primary-teal); border-radius:50%;
    position:fixed; pointer-events:none;
    z-index:9999; mix-blend-mode:multiply;
    transform:translate(-50%,-50%);
}
.cursor-ring {
    width:32px; height:32px;
    border:2px solid rgba(9,106,97,0.4);
    border-radius:50%; position:fixed; pointer-events:none;
    z-index:9998; transform:translate(-50%,-50%);
    transition:width 0.2s ease,height 0.2s ease,opacity 0.2s ease;
}

/* ===== BLOG / MISC ===== */
#blog-container { display:grid; grid-template-columns:repeat(auto-fit,minmax(300px,1fr)); gap:2rem; }
.article-card { cursor:pointer; }
.article-full { background:white; padding:4rem; border-radius:20px; margin-top:2rem; }
.article-full h1 { margin-bottom:2rem; }
.article-full p  { margin-bottom:1.5rem; }

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .nav-links { display:none; }
    .hero-title { font-size:4rem; }
    .timeline::before { left:20px; }
    .timeline-item { flex-direction:column !important; align-items:flex-start; }
    .timeline-content { width:90%; margin-left:40px; margin-bottom:2rem; }
    .timeline-content::before { display:none; }
    section { padding:4rem 0; }
    .hero, #services, #projects { padding-bottom:120px; }
    .floating-badge, .cursor-dot, .cursor-ring { display:none; }
}