/* Base Styles */
:root {
    --color-navy: #1a2e4a;
    --color-navy-light: #2a4a6b;
    --color-navy-dark: #0f1d30;
    --color-navy-mid: #1f3652;
    --color-bg: #1a2e4a;
    --color-bg-alt: #152539;
    --color-text: #ffffff;
    --color-text-muted: rgba(255, 255, 255, 0.65);
    --color-border: rgba(255, 255, 255, 0.1);
    --font-heading: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
    --font-body: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-size: 17px;
    line-height: 1.7;
    color: var(--color-text);
    background-color: var(--color-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

/* Navigation */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: rgba(26, 46, 74, 0.9);
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: none;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.nav-wave {
    position: absolute;
    bottom: -20px;
    left: 0;
    right: 0;
    line-height: 0;
    pointer-events: none;
}

.nav-wave svg {
    display: block;
    width: 100%;
    height: 20px;
}

.nav-scrolled {
    background-color: rgba(15, 29, 48, 0.95);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.2);
}

.nav-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.6rem 2.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 600;
    color: #ffffff;
    text-decoration: none;
    letter-spacing: 0.02em;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 2.5rem;
}

.nav-links a {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    font-size: 1.2rem;
    font-weight: 400;
    transition: color 0.3s ease;
    letter-spacing: 0.03em;
}

.nav-links a:hover {
    color: #ffffff;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 6rem 2rem;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #1a2e4a 0%, #1f3652 25%, #243d5c 50%, #1f3652 75%, #1a2e4a 100%);
    background-size: 400% 400%;
    animation: heroGradient 12s ease infinite;
}

@keyframes heroGradient {
    0% { background-position: 0% 50%; }
    25% { background-position: 100% 0%; }
    50% { background-position: 100% 100%; }
    75% { background-position: 0% 100%; }
    100% { background-position: 0% 50%; }
}

.hero-content {
    max-width: 600px;
    position: relative;
    z-index: 1;
}

.hero-logo {
    max-width: 360px;
    width: 100%;
    height: auto;
    margin-bottom: 2.5rem;
}

.hero-tagline {
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.55);
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

/* Wave Dividers */
.wave-divider {
    position: relative;
    width: 100%;
    overflow: hidden;
    line-height: 0;
}

.wave-divider svg {
    display: block;
    width: 100%;
    height: 80px;
}

.wave-divider.wave-flip {
    transform: rotate(180deg);
}

/* Sections */
section {
    padding: 7rem 0;
    position: relative;
}

section h2 {
    font-family: var(--font-heading);
    font-size: 2.8rem;
    font-weight: 500;
    margin-bottom: 3.5rem;
    text-align: center;
    letter-spacing: 0.02em;
    color: #ffffff;
}

/* Word-by-word stagger for headings */
.word {
    display: inline-block;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
    margin-right: 0.25em;
}

.word.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Services */
.services {
    background-color: var(--color-bg-alt);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
}

.service-item {
    text-align: center;
    padding: 3.25rem 2rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border: 1px solid var(--color-border);
    transition: transform 0.4s ease, box-shadow 0.4s ease, background 0.4s ease;
}

.service-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
    background: rgba(255, 255, 255, 0.08);
}

.service-item h3 {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
    color: #ffffff;
    letter-spacing: 0.02em;
}

.service-item p {
    color: var(--color-text-muted);
    font-size: 1.05rem;
    line-height: 1.8;
}

/* Decorative line under service headings */
.service-item h3::after {
    content: '';
    display: block;
    width: 40px;
    height: 2px;
    background-color: rgba(255, 255, 255, 0.3);
    margin: 0.75rem auto 0;
}

/* Team */
.team-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 4rem;
    max-width: 700px;
    margin: 0 auto;
}

.team-member {
    text-align: center;
}

.team-photo {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 1.5rem;
    filter: grayscale(30%);
    transition: filter 0.4s ease, transform 0.4s ease;
    border: 3px solid rgba(255, 255, 255, 0.15);
}

.team-photo:hover {
    filter: grayscale(0%);
    transform: scale(1.05);
    border-color: rgba(255, 255, 255, 0.4);
}

.team-member h3 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    letter-spacing: 0.01em;
    color: #ffffff;
}

.team-member .role {
    color: var(--color-text-muted);
    font-style: italic;
    font-family: var(--font-heading);
    font-size: 1.1rem;
}

.team-link {
    display: inline-block;
    margin-top: 0.75rem;
    font-size: 0.9rem;
    color: var(--color-text-muted);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: color 0.3s ease, border-color 0.3s ease;
}

.team-link:hover {
    color: #ffffff;
    border-bottom-color: #ffffff;
}

/* Contact */
.contact {
    background-color: var(--color-bg-alt);
    text-align: center;
    color: #ffffff;
}

.contact h2 {
    color: #ffffff;
}

.contact .word {
    color: #ffffff;
}

.contact-intro {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 1.5rem;
}

.contact-email {
    display: inline-block;
    font-family: var(--font-heading);
    font-size: 1.4rem;
    color: #ffffff;
    text-decoration: none;
    padding-bottom: 0.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.4);
    transition: border-color 0.3s ease;
}

.contact-email:hover {
    border-bottom-color: #ffffff;
}

/* Page Header */
.page-header {
    padding-top: 10rem;
    padding-bottom: 4rem;
    text-align: center;
    background: linear-gradient(135deg, #1a2e4a 0%, #1f3652 50%, #1a2e4a 100%);
}

.page-header h1 {
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
    letter-spacing: 0.02em;
    color: #ffffff;
}

.page-intro {
    font-size: 1.1rem;
    color: var(--color-text-muted);
    max-width: 600px;
    margin: 0 auto;
}

/* Portfolio */
.portfolio {
    padding-top: 0;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    max-width: 900px;
    margin: 0 auto;
}

.portfolio-item {
    padding: 3.25rem;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border: 1px solid var(--color-border);
    transition: transform 0.4s ease, box-shadow 0.4s ease, background 0.4s ease;
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}

.portfolio-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    background: rgba(255, 255, 255, 0.08);
}

.portfolio-screenshot {
    display: block;
    flex-shrink: 0;
    width: 180px;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.portfolio-screenshot img {
    display: block;
    width: 100%;
    height: auto;
    transition: transform 0.4s ease;
}

.portfolio-screenshot:hover img {
    transform: scale(1.03);
}

.portfolio-item h3 {
    font-family: var(--font-heading);
    font-size: 1.9rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    letter-spacing: 0.01em;
    color: #ffffff;
}

.portfolio-type {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-bottom: 1rem;
    font-weight: 500;
}

.portfolio-desc {
    color: var(--color-text-muted);
    margin-bottom: 1.25rem;
    line-height: 1.8;
    font-size: 1.1rem;
}

.portfolio-link {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    transition: color 0.3s ease, border-color 0.3s ease;
}

.portfolio-link:hover {
    color: #ffffff;
    border-bottom-color: #ffffff;
}

/* Active nav state */
.nav-links a.active {
    color: #ffffff;
}

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

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

/* Hero fade-in animations */
.fade-in {
    animation: fadeIn 1.2s ease-out forwards;
}

.fade-in-delay-1 {
    opacity: 0;
    animation: fadeIn 1.2s ease-out 0.4s forwards;
}

/* Scroll reveal animations */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

.reveal-delay-1 {
    transition-delay: 0.1s;
}

.reveal-delay-2 {
    transition-delay: 0.2s;
}

.reveal-delay-3 {
    transition-delay: 0.3s;
}

/* Link underline animation */
.nav-links a {
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #ffffff;
    transition: width 0.3s ease;
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

/* Footer */
.footer {
    padding: 2.5rem 0;
    text-align: center;
    border-top: 1px solid var(--color-border);
}

.footer p {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.85rem;
    letter-spacing: 0.03em;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-links {
        gap: 1.5rem;
    }

    .nav-links a {
        font-size: 0.9rem;
    }

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

    .hero-tagline {
        font-size: 0.9rem;
        letter-spacing: 0.1em;
    }

    section {
        padding: 5rem 0;
    }

    section h2 {
        font-size: 2.2rem;
    }

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

    .team-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .team-photo {
        width: 150px;
        height: 150px;
    }

    .wave-divider svg {
        height: 50px;
    }
}

@media (max-width: 480px) {
    .nav-content {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }

    .nav-links {
        gap: 1.25rem;
    }

    .hero {
        padding-top: 8rem;
    }

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

    section h2 {
        font-size: 1.75rem;
        margin-bottom: 2.5rem;
    }

    .contact-email {
        font-size: 1.15rem;
    }

    .page-header {
        padding-top: 8rem;
    }

    .page-header h1 {
        font-size: 2.25rem;
    }

    .portfolio-item {
        padding: 1.75rem;
    }

    .portfolio-item {
        flex-direction: column;
    }

    .portfolio-screenshot {
        width: 100%;
    }

    .portfolio-item h3 {
        font-size: 1.4rem;
    }

    .wave-divider svg {
        height: 35px;
    }
}
