/* ===================================
   TideMark - High-End Tech Aesthetic
   =================================== */

/* CSS Custom Properties */
:root {
    /* Primary Colors */
    --color-navy: #0B1F33;
    --color-navy-light: #0E2238;
    --color-navy-dark: #071524;

    /* Background Colors */
    --color-white: #FFFFFF;
    --color-off-white: #F7F9FB;
    --color-gray-light: #E8ECF0;

    /* Accent Colors */
    --color-ocean: #1F6AE1;
    --color-ocean-light: #3A7FE8;
    --color-teal: #2EC4C6;
    --color-teal-dark: #229A9C;

    /* Text Colors */
    --color-text-primary: #0B1F33;
    --color-text-secondary: #4A5568;
    --color-text-muted: #718096;
    --color-text-light: #A0AEC0;

    /* Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-size-base: 16px;
    --line-height-base: 1.6;
    --line-height-tight: 1.2;
    --line-height-relaxed: 1.8;

    /* Spacing */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 1.5rem;
    --space-lg: 2rem;
    --space-xl: 3rem;
    --space-2xl: 4rem;
    --space-3xl: 6rem;
    --space-4xl: 8rem;

    /* Layout */
    --container-max: 1200px;
    --container-narrow: 800px;

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.5s ease;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(11, 31, 51, 0.05);
    --shadow-md: 0 4px 12px rgba(11, 31, 51, 0.08);
    --shadow-lg: 0 8px 30px rgba(11, 31, 51, 0.12);

    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
}

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: var(--font-size-base);
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-primary);
    font-weight: 400;
    line-height: var(--line-height-base);
    color: var(--color-text-primary);
    background-color: var(--color-white);
    overflow-x: hidden;
}

/* Container */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: var(--line-height-tight);
    color: var(--color-text-primary);
}

h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    letter-spacing: -0.02em;
}

h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    letter-spacing: -0.01em;
}

h3 {
    font-size: clamp(1.25rem, 2vw, 1.5rem);
}

p {
    color: var(--color-text-secondary);
}

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

/* ===================================
   Navigation
   =================================== */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(11, 31, 51, 0.05);
    transition: all var(--transition-base);
}

.nav.scrolled {
    box-shadow: var(--shadow-sm);
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: var(--space-md) var(--space-lg);
}

.logo {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.logo-icon {
    width: 40px;
    height: 40px;
    color: var(--color-ocean);
}

.logo-image {
    height: 40px;
    width: auto;
}

.footer-logo {
    filter: brightness(0) invert(1);
    opacity: 0.9;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--color-navy);
    letter-spacing: -0.02em;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: var(--space-xl);
}

.nav-links a {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--color-text-secondary);
    transition: color var(--transition-fast);
}

.nav-links a:hover {
    color: var(--color-navy);
}

.nav-cta {
    padding: var(--space-xs) var(--space-md);
    background: var(--color-navy);
    color: var(--color-white) !important;
    border-radius: var(--radius-md);
    font-weight: 500;
}

.nav-cta:hover {
    background: var(--color-navy-light);
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
    width: 32px;
    height: 32px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

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

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

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

/* Mobile Menu */
.mobile-menu {
    display: none;
    position: fixed;
    top: 73px;
    left: 0;
    right: 0;
    background: var(--color-white);
    border-bottom: 1px solid var(--color-gray-light);
    padding: var(--space-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all var(--transition-base);
    z-index: 999;
}

.mobile-menu.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.mobile-menu-links {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.mobile-menu-links a {
    font-size: 1.125rem;
    font-weight: 500;
    color: var(--color-text-primary);
    padding: var(--space-sm) 0;
}

/* ===================================
   Hero Section
   =================================== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: var(--space-4xl) 0 var(--space-3xl);
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, var(--color-off-white) 0%, var(--color-white) 100%);
    z-index: -1;
}

.wave {
    position: absolute;
    width: 200%;
    height: 200px;
    bottom: 0;
    left: -50%;
    opacity: 0.5;
}

.wave-1 {
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 100'%3E%3Cpath fill='%231F6AE1' fill-opacity='0.1' d='M0,50 C360,100 720,0 1080,50 C1260,75 1440,50 1440,50 L1440,100 L0,100 Z'/%3E%3C/svg%3E") repeat-x;
    background-size: 1440px 100px;
    animation: wave 20s linear infinite;
}

.wave-2 {
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 100'%3E%3Cpath fill='%232EC4C6' fill-opacity='0.08' d='M0,30 C360,80 720,10 1080,60 C1260,80 1440,30 1440,30 L1440,100 L0,100 Z'/%3E%3C/svg%3E") repeat-x;
    background-size: 1440px 100px;
    animation: wave 15s linear infinite reverse;
    bottom: -20px;
}

.wave-3 {
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 100'%3E%3Cpath fill='%230B1F33' fill-opacity='0.03' d='M0,60 C360,20 720,80 1080,40 C1260,20 1440,60 1440,60 L1440,100 L0,100 Z'/%3E%3C/svg%3E") repeat-x;
    background-size: 1440px 100px;
    animation: wave 25s linear infinite;
    bottom: -40px;
}

@keyframes wave {
    0% { transform: translateX(0); }
    100% { transform: translateX(50%); }
}

.hero-content {
    max-width: var(--container-narrow);
    text-align: center;
    margin: 0 auto;
}

.hero-title {
    margin-bottom: var(--space-lg);
    color: var(--color-navy);
}

.hero-subtitle {
    font-size: clamp(1.125rem, 2vw, 1.25rem);
    color: var(--color-text-secondary);
    margin-bottom: var(--space-xl);
    line-height: var(--line-height-relaxed);
}

/* ===================================
   Buttons
   =================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-md) var(--space-xl);
    font-family: var(--font-primary);
    font-size: 1rem;
    font-weight: 500;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-base);
}

.btn-primary {
    background: var(--color-navy);
    color: var(--color-white);
}

.btn-primary:hover {
    background: var(--color-navy-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-full {
    width: 100%;
}

/* ===================================
   Sections
   =================================== */
.section {
    padding: var(--space-4xl) 0;
}

.section-alt {
    background: var(--color-off-white);
}

.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto var(--space-3xl);
}

.section-title {
    margin-bottom: var(--space-md);
    color: var(--color-navy);
}

.section-lead {
    font-size: clamp(1.125rem, 2vw, 1.25rem);
    color: var(--color-text-secondary);
    margin-bottom: var(--space-sm);
}

.section-text {
    color: var(--color-text-muted);
}

/* ===================================
   Services Grid
   =================================== */
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-lg);
}

.service-card {
    padding: var(--space-xl);
    background: var(--color-off-white);
    border-radius: var(--radius-lg);
    transition: all var(--transition-base);
}

.service-card:hover {
    background: var(--color-white);
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.service-icon {
    width: 48px;
    height: 48px;
    margin-bottom: var(--space-md);
    color: var(--color-ocean);
}

.service-icon svg {
    width: 100%;
    height: 100%;
}

.service-card h3 {
    margin-bottom: var(--space-sm);
    color: var(--color-navy);
}

.service-card p {
    font-size: 0.9375rem;
    color: var(--color-text-muted);
}

/* ===================================
   Process Grid
   =================================== */
.process-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-lg);
}

.process-step {
    text-align: center;
    padding: var(--space-lg);
}

.process-number {
    font-size: 3rem;
    font-weight: 700;
    color: var(--color-teal);
    opacity: 0.3;
    margin-bottom: var(--space-sm);
    line-height: 1;
}

.process-step h3 {
    margin-bottom: var(--space-sm);
    color: var(--color-navy);
}

.process-step p {
    font-size: 0.9375rem;
    color: var(--color-text-muted);
}

/* ===================================
   Reasons Grid
   =================================== */
.reasons-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-lg);
}

.reason-card {
    padding: var(--space-xl);
    border-left: 3px solid var(--color-teal);
    background: var(--color-off-white);
    transition: all var(--transition-base);
}

.reason-card:hover {
    border-left-color: var(--color-ocean);
    background: var(--color-white);
    box-shadow: var(--shadow-md);
}

.reason-card h3 {
    margin-bottom: var(--space-sm);
    color: var(--color-navy);
    font-size: 1.25rem;
}

.reason-card p {
    color: var(--color-text-muted);
}

/* ===================================
   Clients Section
   =================================== */
.clients-content {
    text-align: center;
}

.client-types {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-md);
    margin-bottom: var(--space-xl);
}

.client-type {
    padding: var(--space-sm) var(--space-lg);
    background: var(--color-white);
    border: 1px solid var(--color-gray-light);
    border-radius: var(--radius-md);
    font-size: 0.9375rem;
    color: var(--color-text-secondary);
    transition: all var(--transition-base);
}

.client-type:hover {
    border-color: var(--color-ocean);
    color: var(--color-ocean);
}

.clients-cta {
    font-size: 1.125rem;
    color: var(--color-text-secondary);
}

/* ===================================
   Contact Section
   =================================== */
.section-contact {
    background: linear-gradient(135deg, var(--color-navy) 0%, var(--color-navy-light) 100%);
}

.contact-content {
    display: flex;
    flex-direction: column;
    gap: var(--space-xl);
}

.contact-text {
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
}

.contact-text .section-title {
    color: var(--color-white);
}

.contact-text p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.125rem;
    margin-bottom: var(--space-md);
}

.contact-note {
    font-style: italic;
    opacity: 0.7;
}

/* Contact Form */
.contact-form {
    background: var(--color-white);
    padding: var(--space-xl);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    max-width: 900px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: var(--space-md);
}

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-text-primary);
    margin-bottom: var(--space-xs);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: var(--space-sm) var(--space-md);
    font-family: var(--font-primary);
    font-size: 1rem;
    border: 1px solid var(--color-gray-light);
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
    background: var(--color-white);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-ocean);
    box-shadow: 0 0 0 3px rgba(31, 106, 225, 0.1);
}

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

/* Extended Form Styles */
.contact-form-extended {
    max-width: 100%;
    padding: var(--space-2xl);
}

.form-section {
    margin-bottom: var(--space-xl);
    padding-bottom: var(--space-lg);
    border-bottom: 1px solid var(--color-gray-light);
}

.form-section:last-of-type {
    border-bottom: none;
    margin-bottom: var(--space-md);
}

.form-section-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-ocean);
    margin-bottom: var(--space-lg);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* 2-column form grid */
.form-section .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-md) var(--space-lg);
}

.form-section .form-row .form-group {
    margin-bottom: 0;
}

.form-section .form-group.full-width {
    grid-column: 1 / -1;
}

.form-group select {
    width: 100%;
    padding: var(--space-sm) var(--space-md);
    font-family: var(--font-primary);
    font-size: 1rem;
    border: 1px solid var(--color-gray-light);
    border-radius: var(--radius-sm);
    background: var(--color-white);
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%234A5568' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
}

.form-group select:focus {
    outline: none;
    border-color: var(--color-ocean);
    box-shadow: 0 0 0 3px rgba(31, 106, 225, 0.1);
}

.checkbox-group,
.radio-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.checkbox-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-sm) var(--space-lg);
}

.radio-group {
    flex-direction: row;
    gap: var(--space-lg);
}

.checkbox-label,
.radio-label {
    display: flex;
    align-items: flex-start;
    gap: var(--space-sm);
    cursor: pointer;
    font-weight: 400;
}

.checkbox-label input,
.radio-label input {
    width: auto;
    margin-top: 0.25rem;
    cursor: pointer;
}

.checkbox-label span,
.radio-label span {
    font-size: 0.9375rem;
    color: var(--color-text-secondary);
    line-height: 1.5;
}

.radio-label span strong {
    color: var(--color-text-primary);
}

/* ===================================
   Footer
   =================================== */
.footer {
    background: var(--color-navy-dark);
    padding: var(--space-3xl) 0 var(--space-xl);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: var(--space-xl);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: var(--space-lg);
}

.footer .logo-icon {
    color: var(--color-teal);
}

.footer .logo-text {
    color: var(--color-white);
}

.footer-links {
    display: flex;
    gap: var(--space-xl);
}

.footer-links a {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9375rem;
    transition: color var(--transition-fast);
}

.footer-links a:hover {
    color: var(--color-white);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-tagline {
    margin-top: var(--space-sm);
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.6);
    font-style: italic;
}

.footer-location {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 500;
}

.footer-legal,
.footer-copyright {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.4);
}

/* ===================================
   Responsive Design
   =================================== */
@media (max-width: 1024px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

    .contact-content {
        gap: var(--space-xl);
    }

    .form-section .form-row {
        grid-template-columns: 1fr 1fr;
    }

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

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .mobile-menu {
        display: block;
    }

    .hero {
        min-height: auto;
        padding: calc(var(--space-4xl) + 60px) 0 var(--space-3xl);
    }

    .section {
        padding: var(--space-3xl) 0;
    }

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

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

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

    /* Form responsive - collapse to 1 column */
    .form-section .form-row {
        grid-template-columns: 1fr;
    }

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

    .radio-group {
        flex-direction: column;
        gap: var(--space-sm);
    }

    .contact-form-extended {
        padding: var(--space-lg);
    }

    .footer-content {
        flex-direction: column;
        gap: var(--space-lg);
        text-align: center;
    }

    .footer-links {
        flex-wrap: wrap;
        justify-content: center;
    }

    .footer-bottom {
        flex-direction: column;
        gap: var(--space-sm);
        text-align: center;
    }
}

@media (max-width: 480px) {
    :root {
        --space-lg: 1.5rem;
        --space-xl: 2rem;
        --space-2xl: 3rem;
        --space-3xl: 4rem;
        --space-4xl: 5rem;
    }

    .container {
        padding: 0 var(--space-md);
    }

    .client-types {
        flex-direction: column;
    }

    .client-type {
        width: 100%;
    }
}

/* ===================================
   Animation Classes
   =================================== */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* Stagger children animations */
.stagger-children .fade-in:nth-child(1) { transition-delay: 0.1s; }
.stagger-children .fade-in:nth-child(2) { transition-delay: 0.2s; }
.stagger-children .fade-in:nth-child(3) { transition-delay: 0.3s; }
.stagger-children .fade-in:nth-child(4) { transition-delay: 0.4s; }
