/* ============================================
   PERPETUAL LOGIC - Main Stylesheet
   ============================================

   HOW TO UPDATE THIS FILE:
   - Colors are defined as CSS variables at the top (--primary-bg, --text-color, etc.)
   - To change colors, just update the values in the :root section
   - Each section is labeled with comments explaining what it styles
   - Search for "EDIT:" comments for commonly updated values

   ============================================ */

/* --------------------------------------------
   CSS VARIABLES (Easy to customize)
   EDIT: Change these values to update colors across the entire site
   -------------------------------------------- */
:root {
    /* Colors */
    --primary-bg: #000000;           /* Main background color (black) */
    --secondary-bg: #111111;         /* Slightly lighter black for contrast */
    --text-color: #ffffff;           /* Main text color (white) */
    --text-muted: #888888;           /* Muted/secondary text color */
    --accent-color: #ffffff;         /* Accent color for links/buttons */
    --border-color: #333333;         /* Border color for form inputs */

    /* Typography */
    --font-primary: 'Rajdhani', sans-serif;
    --font-size-base: 16px;
    --font-size-small: 14px;
    --font-size-large: 18px;
    --font-size-h1: 48px;
    --font-size-h2: 36px;
    --font-size-h3: 24px;

    /* Spacing */
    --spacing-xs: 8px;
    --spacing-sm: 16px;
    --spacing-md: 24px;
    --spacing-lg: 48px;
    --spacing-xl: 80px;

    /* Layout */
    --max-width: 1200px;
    --header-height: 80px;

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-medium: 0.3s ease;
}

/* --------------------------------------------
   RESET & BASE STYLES
   -------------------------------------------- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: var(--font-size-base);
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    background-color: var(--primary-bg);
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

main {
    flex: 1;
}

/* --------------------------------------------
   TYPOGRAPHY
   -------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
    font-weight: 400;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

h1 {
    font-size: var(--font-size-h1);
}

h2 {
    font-size: var(--font-size-h2);
}

h3 {
    font-size: var(--font-size-h3);
}

p {
    margin-bottom: var(--spacing-md);
    color: var(--text-muted);
}

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

a:hover {
    opacity: 0.7;
}

/* --------------------------------------------
   LAYOUT UTILITIES
   -------------------------------------------- */
.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

/* --------------------------------------------
   HEADER & NAVIGATION
   EDIT: Adjust header-height in :root to change header size
   -------------------------------------------- */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background-color: transparent;
    z-index: 1000;
    display: flex;
    align-items: center;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo {
    display: flex;
    align-items: center;
}

.logo img,
.logo svg {
    height: 40px;
    width: auto;
}

/* Navigation Links */
.nav {
    display: flex;
    align-items: center;
    gap: var(--spacing-lg);
}

.nav a {
    font-size: var(--font-size-base);
    font-weight: 600;
    text-decoration: none;
    transition: opacity var(--transition-fast);
}

.nav a:hover {
    opacity: 0.7;
}

/* Mobile Menu Button (hidden on desktop) */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--spacing-xs);
    z-index: 1001;
}

.mobile-menu-btn span {
    display: block;
    width: 24px;
    height: 2px;
    background-color: var(--text-color);
    margin: 6px 0;
    transition: var(--transition-fast);
}

/* --------------------------------------------
   HERO SECTION (Home Page)
   -------------------------------------------- */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: var(--header-height) var(--spacing-md) 15vh;
    position: relative;
    overflow: hidden;
}

/* Animated Background - Subtle Parallax */
.hero::before {
    content: '';
    position: absolute;
    top: -10%;
    left: -10%;
    width: 120%;
    height: 120%;
    background-image: url('../images/hero-bg.jpg');
    background-size: cover;
    background-position: center;
    opacity: 0.10;
    animation: subtleParallax 25s ease-in-out infinite;
    z-index: 0;
}

/* Keep hero content above the background */
.hero > * {
    position: relative;
    z-index: 1;
}

/* Subtle parallax animation - gentle movement creating depth */
@keyframes subtleParallax {
    0% {
        transform: translateX(0) translateY(0) scale(1);
    }
    33% {
        transform: translateX(-2%) translateY(-1%) scale(1.02);
    }
    66% {
        transform: translateX(1%) translateY(-2%) scale(1.01);
    }
    100% {
        transform: translateX(0) translateY(0) scale(1);
    }
}

.hero-logo {
    max-width: 800px;
    width: 100%;
    margin-bottom: 0;
}

.hero-logo img,
.hero-logo svg {
    width: 100%;
    height: auto;
}

/* EDIT: Change tagline styling here */
.hero-tagline {
    font-size: 31px;
    font-style: italic;
    font-weight: 600;
    color: var(--text-muted);
    max-width: 800px;
    margin-top: -180px;
}

.hero-btn {
    display: inline-block;
    margin-top: var(--spacing-md);
    padding: 12px 36px;
    border: 1px solid var(--text-muted);
    border-radius: 30px;
    background-color: var(--text-muted);
    color: var(--primary-bg);
    font-family: var(--font-primary);
    font-size: var(--font-size-base);
    font-weight: 600;
    text-decoration: none;
    letter-spacing: 0.05em;
    transition: background-color var(--transition-fast), color var(--transition-fast);
}

.hero-btn:hover {
    background-color: transparent;
    color: var(--text-muted);
}

/* --------------------------------------------
   PAGE HEADER (Inner Pages)
   -------------------------------------------- */
.page-header {
    padding-top: calc(var(--header-height) + var(--spacing-xl));
    padding-bottom: 0;
    text-align: center;
}

.page-header h1 {
    font-size: 55px;
    margin-bottom: var(--spacing-sm);
}

.page-header p {
    margin: 0 auto 0;
    font-size: var(--font-size-large);
    color: #cccccc;
}

.page-header + .content-section {
    padding-top: 60px !important;
}

/* --------------------------------------------
   CONTENT SECTIONS
   -------------------------------------------- */
.content-section {
    padding: var(--spacing-xl) 0;
}

.content-section h2 {
    text-align: center;
    margin-bottom: var(--spacing-md);
}

/* --------------------------------------------
   SERVICE BLOCKS (Consulting Page)
   -------------------------------------------- */
.content-section:has(.service-block) {
    padding: var(--spacing-xs) 0;
}

/* Accordion toggle heading */
.service-toggle {
    cursor: pointer;
    user-select: none;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--spacing-sm);
    transition: opacity var(--transition-fast);
}

.service-toggle:hover {
    opacity: 0.7;
}

.toggle-icon {
    font-size: var(--font-size-base);
    font-weight: 300;
    transition: transform var(--transition-medium);
}

.service-toggle.active .toggle-icon {
    transform: rotate(45deg);
}

/* Accordion content */
.service-content {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.5s ease, opacity 0.4s ease, margin 0.5s ease;
    margin-top: 0;
}

.service-content.open {
    max-height: 600px;
    opacity: 1;
    margin-top: var(--spacing-md);
}

.service-block h2 {
    text-align: center;
    font-size: var(--font-size-h3);
    margin-bottom: 0;
}

.service-block p {
    font-size: var(--font-size-large);
    margin-bottom: var(--spacing-md);
    text-align: left;
    color: #cccccc;
}

.service-block ul {
    list-style: none;
    padding: 0;
    display: inline-block;
    text-align: left;
}

.service-block {
    text-align: center;
}

.service-block ul li {
    position: relative;
    padding-left: var(--spacing-md);
    margin-bottom: var(--spacing-sm);
    color: #cccccc;
    font-size: var(--font-size-base);
    line-height: 1.6;
}

.service-block ul li::before {
    content: '—';
    position: absolute;
    left: 0;
    color: #cccccc;
}

/* --------------------------------------------
   LOGO GRID (Client & Portfolio Logos)
   EDIT: Adjust logo sizes in --logo-size
   -------------------------------------------- */
.logo-grid {
    --logo-size: 61px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: var(--spacing-lg);
    padding: var(--spacing-sm) 0;
}

.logo-grid-item {
    width: var(--logo-size);
    height: var(--logo-size);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.6;
    transition: opacity var(--transition-medium);
    /* Grayscale filter for consistent look */
    filter: grayscale(100%) brightness(2);
}

.logo-grid-item:hover {
    opacity: 1;
}

.logo-grid-item img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* --------------------------------------------
   CONTACT FORM
   EDIT: Form input styles
   -------------------------------------------- */
.contact-section {
    max-width: 600px;
    margin: 0 auto;
    padding: var(--spacing-xs) var(--spacing-md) var(--spacing-md);
}

.contact-info-top {
    margin-top: calc(-1 * var(--spacing-sm));
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

.form-group label {
    font-size: var(--font-size-small);
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.form-group input,
.form-group textarea {
    padding: var(--spacing-sm);
    background-color: rgba(255, 255, 255, 0.15);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    font-family: var(--font-primary);
    font-size: var(--font-size-base);
    transition: border-color var(--transition-fast);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--text-color);
}

.form-group textarea {
    min-height: 150px;
    resize: vertical;
}

/* Submit Button */
.btn {
    display: inline-block;
    padding: var(--spacing-sm) var(--spacing-lg);
    background-color: var(--text-color);
    color: var(--primary-bg);
    font-family: var(--font-primary);
    font-size: var(--font-size-base);
    border: none;
    cursor: pointer;
    transition: opacity var(--transition-fast);
    text-align: center;
}

.btn:hover {
    opacity: 0.8;
}

/* Contact Info */
.contact-info {
    margin-top: var(--spacing-xl);
    text-align: center;
}

.contact-info-top {
    margin-top: 0;
    margin-bottom: var(--spacing-md);
}

.contact-info p {
    margin-bottom: var(--spacing-sm);
}

.contact-info a {
    color: var(--text-color);
    text-decoration: underline;
    text-underline-offset: 4px;
}

/* Social Links */
.social-links {
    display: flex;
    justify-content: center;
    gap: var(--spacing-md);
    margin-top: var(--spacing-md);
}

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

.social-links a:hover {
    border-color: var(--text-color);
    background-color: var(--text-color);
    opacity: 1;
}

.social-links a:hover svg {
    fill: var(--primary-bg);
}

.social-links svg {
    width: 20px;
    height: 20px;
    fill: var(--text-color);
    transition: fill var(--transition-fast);
}

/* --------------------------------------------
   WAVE BACKGROUND CANVAS
   -------------------------------------------- */
.wave-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    opacity: 0.15;
}

/* --------------------------------------------
   FOOTER
   -------------------------------------------- */
.footer {
    padding: var(--spacing-md) 0;
    text-align: center;
    background-color: transparent;
}

.footer p {
    font-size: var(--font-size-small);
    color: var(--text-muted);
    font-weight: 600;
    opacity: 0.5;
    margin: 0;
}

.home-page .footer {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
}

/* --------------------------------------------
   ANIMATIONS (Fade In)
   -------------------------------------------- */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* --------------------------------------------
   MOBILE STYLES (Responsive)
   -------------------------------------------- */

/* Tablet and below (768px and smaller) */
@media (max-width: 768px) {
    :root {
        --font-size-h1: 36px;
        --font-size-h2: 28px;
        --font-size-h3: 20px;
        --spacing-xl: 60px;
    }

    /* Show mobile menu button */
    .mobile-menu-btn {
        display: block;
    }

    /* Mobile Navigation */
    .nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        background-color: var(--primary-bg);
        flex-direction: column;
        justify-content: center;
        gap: var(--spacing-lg);
        transition: right var(--transition-medium);
    }

    .nav.active {
        right: 0;
    }

    .nav a {
        font-size: var(--font-size-h3);
    }

    /* Mobile menu button animation when active */
    .mobile-menu-btn.active span:nth-child(1) {
        transform: rotate(45deg) translate(6px, 6px);
    }

    .mobile-menu-btn.active span:nth-child(2) {
        opacity: 0;
    }

    .mobile-menu-btn.active span:nth-child(3) {
        transform: rotate(-45deg) translate(6px, -6px);
    }

    .page-header h1 {
        font-size: 41px;
    }

    /* Hero adjustments */
    .hero-logo {
        max-width: 524px;
    }

    .hero-tagline {
        font-size: 19px;
        padding: 0 var(--spacing-sm);
        margin-top: -60px;
    }

    .hero-btn {
        display: inline-block;
        padding: 12px 36px;
        border: 1px solid var(--text-muted);
        border-radius: 30px;
        background-color: var(--text-muted);
        color: var(--primary-bg);
        font-size: var(--font-size-base);
    }

    /* Logo grid adjustments */
    .logo-grid {
        --logo-size: 60px;
        gap: var(--spacing-md);
    }
}

/* Mobile phones (480px and smaller) */
@media (max-width: 480px) {
    :root {
        --font-size-h1: 28px;
        --font-size-h2: 24px;
        --font-size-h3: 18px;
        --spacing-lg: 32px;
        --spacing-xl: 48px;
    }

    .page-header h1 {
        font-size: 32px;
    }

    .hero-logo {
        max-width: 412px;
    }

    .logo-grid {
        --logo-size: 48px;
    }

    .btn {
        width: 100%;
    }
}
