/* ============================================
   AGENSEFY - ANIMATED WEBSITE
   Luxe Modernism with Cinematic Depth
   ============================================ */

/* Root Variables */
:root {
    --primary: #D4C5B9;
    --primary-dark: #0F0F0F;
    --secondary: #1A1A1A;
    --tertiary: #2A2A2A;
    --accent: #D4C5B9;
    --text-light: #E8DCC8;
    --text-muted: #9A8F82;
    --border-color: #2A2A2A;
    --transition: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ============================================
   RESET & BASE STYLES
   ============================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Sora', sans-serif;
    background-color: var(--primary-dark);
    color: var(--text-light);
    overflow-x: hidden;
    line-height: 1.6;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* ============================================
   TYPOGRAPHY
   ============================================ */

h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    line-height: 1.2;
}

h2 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    animation: slideInUp 0.8s ease-out;
}

h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

p {
    font-size: 1rem;
    color: var(--text-light);
    opacity: 0.9;
}

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

/* ============================================
   BUTTONS
   ============================================ */

.btn-primary {
    background-color: var(--accent);
    color: var(--primary-dark);
    padding: 0.875rem 2rem;
    border: none;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    transition: left 0.6s ease;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 20px 40px rgba(212, 197, 185, 0.3);
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-secondary {
    background-color: transparent;
    color: var(--accent);
    padding: 0.875rem 2rem;
    border: 2px solid var(--accent);
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

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

.btn-lg {
    padding: 1.125rem 2.5rem;
    font-size: 1.125rem;
}

/* ============================================
   NAVIGATION
   ============================================ */

.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(15, 15, 15, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    animation: slideDown 0.8s ease-out;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.nav-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    font-weight: 700;
    animation: fadeInLeft 0.8s ease-out 0.2s both;
}

.logo-box {
    width: 2.5rem;
    height: 2.5rem;
    background-color: var(--accent);
    color: var(--primary-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.25rem;
    font-weight: 700;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
    animation: fadeInRight 0.8s ease-out 0.2s both;
}

.nav-link {
    color: var(--text-light);
    font-size: 0.95rem;
    position: relative;
    transition: var(--transition);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent);
    transition: width 0.4s ease;
}

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

/* ============================================
   HERO SECTION
   ============================================ */

.hero {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-top: 80px;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    animation: zoomIn 1.2s ease-out;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 800px;
}

.hero-text {
    animation: fadeInUp 1s ease-out 0.3s both;
}

.hero-title {
    font-size: 4.5rem;
    margin-bottom: 2rem;
    line-height: 1.1;
}

.hero-title .word {
    display: inline-block;
    animation: slideInUp 0.8s ease-out;
    margin-right: 0.3em;
}

.hero-title .word:nth-child(1) {
    animation-delay: 0.2s;
}

.hero-title .word:nth-child(2) {
    animation-delay: 0.4s;
}

.hero-title .word:nth-child(3) {
    animation-delay: 0.6s;
}

.hero-title .accent {
    color: var(--accent);
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-light);
    margin-bottom: 2.5rem;
    opacity: 0.9;
    animation: fadeIn 1s ease-out 0.8s both;
}

.hero-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeIn 1s ease-out 1s both;
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    animation: bounce 2s infinite;
}

.scroll-indicator span {
    display: block;
    width: 24px;
    height: 40px;
    border: 2px solid var(--accent);
    border-radius: 12px;
    position: relative;
}

.scroll-indicator span::after {
    content: '';
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 6px;
    background-color: var(--accent);
    border-radius: 2px;
    animation: scrollDot 1.5s infinite;
}

@keyframes scrollDot {
    0% {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }
    100% {
        transform: translateX(-50%) translateY(12px);
        opacity: 0;
    }
}

@keyframes bounce {
    0%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    50% {
        transform: translateX(-50%) translateY(-10px);
    }
}

/* Floating Shapes */
.floating-shapes {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 0;
    overflow: hidden;
}

.shape {
    position: absolute;
    opacity: 0.1;
    border-radius: 50%;
}

.shape-1 {
    width: 300px;
    height: 300px;
    background: var(--accent);
    top: 10%;
    right: 10%;
    animation: float 6s ease-in-out infinite;
}

.shape-2 {
    width: 200px;
    height: 200px;
    background: var(--accent);
    bottom: 20%;
    left: 5%;
    animation: float 8s ease-in-out infinite 1s;
}

.shape-3 {
    width: 150px;
    height: 150px;
    background: var(--accent);
    top: 50%;
    left: 50%;
    animation: float 7s ease-in-out infinite 2s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(30px);
    }
}

/* ============================================
   SERVICES SECTION
   ============================================ */

.services {
    padding: 8rem 0;
    background-color: var(--primary-dark);
    position: relative;
}

.services::before {
    content: '';
    position: absolute;
    top: -100px;
    right: -200px;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(212, 197, 185, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.section-header {
    margin-bottom: 4rem;
    animation: fadeInUp 0.8s ease-out;
}

.header-line {
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, var(--accent) 0%, transparent 100%);
    margin-top: 1rem;
    animation: expandWidth 0.8s ease-out 0.2s both;
}

@keyframes expandWidth {
    from {
        width: 0;
    }
    to {
        width: 80px;
    }
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.service-card {
    background: var(--secondary);
    border: 1px solid var(--border-color);
    padding: 2.5rem;
    border-radius: 0.5rem;
    position: relative;
    overflow: hidden;
    transition: var(--transition);
    animation: fadeInUp 0.8s ease-out;
}

.service-card:nth-child(1) {
    animation-delay: 0.1s;
}

.service-card:nth-child(2) {
    animation-delay: 0.2s;
}

.service-card:nth-child(3) {
    animation-delay: 0.3s;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(212, 197, 185, 0.1), transparent);
    transition: left 0.6s ease;
}

.service-card:hover::before {
    left: 100%;
}

.service-card:hover {
    border-color: var(--accent);
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(212, 197, 185, 0.15);
}

.card-icon {
    width: 50px;
    height: 50px;
    background: rgba(212, 197, 185, 0.1);
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    color: var(--accent);
    transition: var(--transition);
}

.service-card:hover .card-icon {
    background: rgba(212, 197, 185, 0.2);
    transform: scale(1.1) rotate(5deg);
}

.card-icon svg {
    width: 24px;
    height: 24px;
    stroke-width: 2;
}

.service-card h3 {
    margin-bottom: 1rem;
    transition: var(--transition);
}

.service-card:hover h3 {
    color: var(--accent);
}

.service-card p {
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    line-height: 1.7;
}

.card-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--accent);
    font-weight: 600;
    position: relative;
}

.card-link::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width 0.4s ease;
}

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

/* ============================================
   STATS SECTION
   ============================================ */

.stats {
    padding: 6rem 0;
    background: var(--secondary);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.stats::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(212, 197, 185, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 3rem;
    position: relative;
    z-index: 1;
}

.stat-item {
    text-align: center;
    animation: fadeInUp 0.8s ease-out;
}

.stat-item:nth-child(1) {
    animation-delay: 0.1s;
}

.stat-item:nth-child(2) {
    animation-delay: 0.2s;
}

.stat-item:nth-child(3) {
    animation-delay: 0.3s;
}

.stat-item:nth-child(4) {
    animation-delay: 0.4s;
}

.stat-number {
    font-family: 'Playfair Display', serif;
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 0.5rem;
    animation: countUp 2s ease-out;
}

.stat-plus, .stat-x, .stat-percent {
    font-size: 1.5rem;
    margin-left: 0.25rem;
}

.stat-label {
    color: var(--text-muted);
    font-size: 0.95rem;
}

@keyframes countUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   FEATURED WORK SECTION
   ============================================ */

.featured-work {
    padding: 8rem 0;
    background-color: var(--primary-dark);
}

.work-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 3rem;
}

.case-study {
    position: relative;
    height: 400px;
    border-radius: 0.5rem;
    overflow: hidden;
    group: "case-study";
    animation: fadeInUp 0.8s ease-out;
}

.case-study:nth-child(1) {
    animation-delay: 0.1s;
}

.case-study:nth-child(2) {
    animation-delay: 0.2s;
}

.case-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.case-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.case-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    transition: var(--transition);
}

.case-study:hover .case-overlay {
    background: rgba(0, 0, 0, 0.6);
}

.case-study:hover .case-image img {
    transform: scale(1.1);
}

.case-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 2.5rem;
    background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.9) 100%);
    color: white;
    z-index: 2;
    transform: translateY(30px);
    transition: var(--transition);
}

.case-study:hover .case-content {
    transform: translateY(0);
}

.case-content h3 {
    font-size: 1.75rem;
    margin-bottom: 0.75rem;
    color: white;
}

.case-content p {
    font-size: 0.95rem;
    margin-bottom: 1rem;
    color: rgba(255, 255, 255, 0.9);
}

.case-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--accent);
    font-weight: 600;
    position: relative;
}

.case-link::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width 0.4s ease;
}

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

/* ============================================
   CTA SECTION
   ============================================ */

.cta {
    padding: 8rem 0;
    background: var(--secondary);
    border-top: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.cta::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(212, 197, 185, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    animation: pulse 4s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
    }
    50% {
        transform: translate(-50%, -50%) scale(1.1);
    }
}

.cta-content {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
    animation: fadeInUp 0.8s ease-out;
}

.cta-content h2 {
    margin-bottom: 1.5rem;
}

.cta-content p {
    font-size: 1.1rem;
    margin-bottom: 2.5rem;
    color: var(--text-light);
}

/* ============================================
   FOOTER
   ============================================ */

.footer {
    background-color: var(--primary-dark);
    border-top: 1px solid var(--border-color);
    padding: 4rem 0 2rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.footer-col {
    animation: fadeInUp 0.8s ease-out;
}

.footer-col:nth-child(1) {
    animation-delay: 0.1s;
}

.footer-col:nth-child(2) {
    animation-delay: 0.2s;
}

.footer-col:nth-child(3) {
    animation-delay: 0.3s;
}

.footer-col:nth-child(4) {
    animation-delay: 0.4s;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-family: 'Playfair Display', serif;
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.footer-col h4 {
    font-family: 'Playfair Display', serif;
    font-size: 1rem;
    margin-bottom: 1rem;
    color: var(--text-light);
}

.footer-col p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 0.75rem;
}

.footer-col a {
    color: var(--text-muted);
    transition: var(--transition);
    position: relative;
}

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

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

.footer-col a:hover::after {
    width: 100%;
}

.footer-bottom {
    border-top: 1px solid var(--border-color);
    padding-top: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-bottom p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-links a {
    font-size: 0.9rem;
    color: var(--text-muted);
}

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

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

@keyframes zoomIn {
    from {
        transform: scale(1.1);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

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

@media (max-width: 768px) {
    .nav-links {
        gap: 1rem;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .hero-buttons {
        flex-direction: column;
    }

    h2 {
        font-size: 2rem;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }

    .stat-number {
        font-size: 2rem;
    }

    .work-grid {
        grid-template-columns: 1fr;
    }

    .case-study {
        height: 300px;
    }

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

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }

    .nav-links {
        gap: 0.5rem;
    }

    .nav-link {
        font-size: 0.85rem;
    }

    .hero {
        margin-top: 60px;
    }

    .hero-title {
        font-size: 1.75rem;
    }

    .hero-title .word {
        display: block;
        margin-right: 0;
    }

    .hero-subtitle {
        font-size: 0.9rem;
    }

    .hero-buttons {
        flex-direction: column;
        gap: 1rem;
    }

    .btn-primary, .btn-secondary {
        width: 100%;
    }

    h2 {
        font-size: 1.5rem;
    }

    .section-header {
        margin-bottom: 2rem;
    }

    .services-grid {
        gap: 1rem;
    }

    .service-card {
        padding: 1.5rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .stat-number {
        font-size: 1.75rem;
    }

    .work-grid {
        gap: 1.5rem;
    }

    .case-study {
        height: 250px;
    }

    .case-content {
        padding: 1.5rem;
    }

    .case-content h3 {
        font-size: 1.25rem;
    }

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

    .footer-col {
        text-align: center;
    }
}
