/* CoastalLabs Custom Styles */

/* CSS Variables for Theme Colors & Typography */
:root {
    /* Colors */
    --coastal-primary: #0ea5e9;
    --coastal-primary-dark: #0284c7;
    --coastal-secondary: #06b6d4;
    --coastal-accent: #0891b2;
    --coastal-light: #f0f9ff;
    --coastal-dark: #1e293b;
    --coastal-gradient: linear-gradient(135deg, #0ea5e9 0%, #06b6d4 100%);

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);

    /* Typography Scale - Based on Figma best practices */
    --font-family-primary: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-family-mono: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;

    /* Font Sizes - Modular scale for hierarchy */
    --font-size-xs: 0.75rem;
    /* 12px */
    --font-size-sm: 0.875rem;
    /* 14px */
    --font-size-base: 1rem;
    /* 16px - Body text */
    --font-size-lg: 1.125rem;
    /* 18px */
    --font-size-xl: 1.25rem;
    /* 20px */
    --font-size-2xl: 1.5rem;
    /* 24px */
    --font-size-3xl: 1.875rem;
    /* 30px */
    --font-size-4xl: 2.25rem;
    /* 36px */
    --font-size-5xl: 3rem;
    /* 48px */
    --font-size-6xl: 3.75rem;
    /* 60px */

    /* Font Weights */
    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
    --font-weight-extrabold: 800;

    /* Line Heights - Optimized for readability */
    --line-height-tight: 1.25;
    --line-height-snug: 1.375;
    --line-height-normal: 1.5;
    --line-height-relaxed: 1.625;
    --line-height-loose: 2;

    /* Letter Spacing */
    --letter-spacing-tighter: -0.05em;
    --letter-spacing-tight: -0.025em;
    --letter-spacing-normal: 0em;
    --letter-spacing-wide: 0.025em;
    --letter-spacing-wider: 0.05em;
    --letter-spacing-widest: 0.1em;

    /* Content Width - Optimal reading length */
    --content-width-narrow: 45ch;
    /* For readability */
    --content-width-normal: 65ch;
    --content-width-wide: 80ch;
}

/* Global Styles */
body {
    font-family: var(--font-family-primary);
    font-size: var(--font-size-base);
    line-height: var(--line-height-relaxed);
    letter-spacing: var(--letter-spacing-normal);
    padding-top: 76px;
    /* Account for fixed navbar */
    color: var(--coastal-dark);
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Custom Bootstrap color overrides */
.btn-primary {
    background-color: var(--coastal-primary);
    border-color: var(--coastal-primary);
}

.btn-primary:hover {
    background-color: var(--coastal-primary-dark);
    border-color: var(--coastal-primary-dark);
}

.text-primary {
    color: var(--coastal-primary) !important;
}

.bg-primary {
    background-color: var(--coastal-primary) !important;
}

/* Gradient Backgrounds */
.bg-gradient-primary {
    background: var(--coastal-gradient);
}

/* Navigation Styles */
.navbar {
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
}

.nav-link {
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: var(--coastal-primary) !important;
}

.nav-link.active {
    color: var(--coastal-primary) !important;
    font-weight: 600;
}

/* Hero Section */
.hero-section {
    min-height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 100" fill="white" opacity="0.1"><path d="M0,0 C150,100 350,0 500,50 C650,100 850,0 1000,50 L1000,100 L0,100 Z"></path></svg>') repeat-x bottom;
    background-size: 1000px 100px;
    pointer-events: none;
}

.hero-image {
    /* Animation removed */
}

/* Hero buttons need to be above the ::before overlay */
.hero-buttons {
    position: relative;
    z-index: 1000;
}

.hero-buttons .btn {
    position: relative;
    z-index: 1001;
}

/* Service Cards */
.service-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 12px;
    background: white;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.service-icon {
    transition: transform 0.3s ease;
}

.service-card:hover .service-icon {
    transform: scale(1.1);
}

/* Project Cards */
.project-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: none !important;
    overflow: hidden;
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

.project-image {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.project-overlay {
    background: rgba(0, 0, 0, 0.8);
    transition: opacity 0.3s ease;
}

.project-card:hover .project-overlay {
    opacity: 1 !important;
}

.project-rating {
    display: flex;
    align-items: center;
}

.tech-stack {
    border-top: 1px solid #e5e7eb;
    padding-top: 0.75rem;
    margin-top: 0.75rem;
}

/* Filter Buttons */
.btn-group .btn-check:checked+.btn {
    background-color: var(--coastal-primary);
    border-color: var(--coastal-primary);
    color: white;
}

/* Contact Form */
.contact-form {
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.form-control:focus {
    border-color: var(--coastal-primary);
    box-shadow: 0 0 0 0.2rem rgba(14, 165, 233, 0.25);
}

.form-select:focus {
    border-color: var(--coastal-primary);
    box-shadow: 0 0 0 0.2rem rgba(14, 165, 233, 0.25);
}

/* Contact Info */
.contact-item {
    padding: 1rem;
    border-radius: 8px;
    transition: background-color 0.3s ease;
}

.contact-item:hover {
    background-color: var(--coastal-light);
}

.contact-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: rgba(14, 165, 233, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Expertise Cards */
.expertise-card {
    transition: transform 0.3s ease;
    border-radius: 8px;
}

.expertise-card:hover {
    transform: translateY(-3px);
    background-color: white;
    box-shadow: var(--shadow);
}

/* Value Cards */
.value-card {
    transition: transform 0.3s ease;
}

.value-card:hover {
    transform: translateY(-3px);
}

/* Process Steps */
.process-step {
    position: relative;
}

.step-number {
    font-size: 1.25rem;
    box-shadow: var(--shadow);
}

/* Accordion Customization */
.accordion-button:not(.collapsed) {
    background-color: var(--coastal-light);
    color: var(--coastal-dark);
}

.accordion-button:focus {
    box-shadow: 0 0 0 0.2rem rgba(14, 165, 233, 0.25);
}

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

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

.fade-in-up {
    animation: fadeInUp 0.8s ease-out;
}

/* Scroll Animations */
.scroll-fade {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* Button Hover Effects */
.btn {
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

/* Social Links */
.social-links .btn {
    transition: all 0.3s ease;
}

.social-links .btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

/* Footer */
footer {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

footer a:hover {
    color: var(--coastal-secondary) !important;
}

/* Responsive Design Enhancements */
@media (max-width: 768px) {
    .hero-section {
        min-height: 80vh;
        text-align: center;
    }

    .display-4 {
        font-size: 2.5rem;
    }

    .lead {
        font-size: 1.1rem;
    }

    .project-card {
        margin-bottom: 2rem;
    }

    .contact-form {
        margin-bottom: 3rem;
    }
}

@media (max-width: 576px) {
    .display-4 {
        font-size: 2rem;
    }

    .btn-lg {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }

    .service-card,
    .project-card {
        margin-bottom: 1.5rem;
    }
}

/* Loading Animation */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid var(--coastal-primary);
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Utility Classes */
.text-gradient {
    background: var(--coastal-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.border-gradient {
    border: 2px solid;
    border-image: var(--coastal-gradient) 1;
}

.shadow-coastal {
    box-shadow: 0 4px 6px -1px rgba(14, 165, 233, 0.1), 0 2px 4px -2px rgba(14, 165, 233, 0.1);
}

/* Typography System - Based on Figma Best Practices */

/* Heading Styles with Proper Hierarchy */
h1,
.h1 {
    font-size: var(--font-size-5xl);
    font-weight: var(--font-weight-bold);
    line-height: var(--line-height-tight);
    letter-spacing: var(--letter-spacing-tight);
    margin-bottom: 1.5rem;
}

h2,
.h2 {
    font-size: var(--font-size-4xl);
    font-weight: var(--font-weight-bold);
    line-height: var(--line-height-tight);
    letter-spacing: var(--letter-spacing-tight);
    margin-bottom: 1.25rem;
}

h3,
.h3 {
    font-size: var(--font-size-3xl);
    font-weight: var(--font-weight-semibold);
    line-height: var(--line-height-snug);
    letter-spacing: var(--letter-spacing-normal);
    margin-bottom: 1rem;
}

h4,
.h4 {
    font-size: var(--font-size-2xl);
    font-weight: var(--font-weight-semibold);
    line-height: var(--line-height-snug);
    margin-bottom: 0.875rem;
}

h5,
.h5 {
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-medium);
    line-height: var(--line-height-normal);
    margin-bottom: 0.75rem;
}

h6,
.h6 {
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-medium);
    line-height: var(--line-height-normal);
    margin-bottom: 0.5rem;
}

/* Body Text Optimization */
p {
    font-size: var(--font-size-base);
    line-height: var(--line-height-relaxed);
    margin-bottom: 1.25rem;
}

.lead {
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-normal);
    line-height: var(--line-height-relaxed);
    letter-spacing: var(--letter-spacing-normal);
}

/* Content Width for Optimal Readability - Based on Figma's 40-60 character guideline */
.content-optimized {
    max-width: var(--content-width-normal);
    /* ~65 characters for optimal reading */
}

.content-narrow {
    max-width: var(--content-width-narrow);
    /* ~45 characters for narrow content */
}

/* Enhanced Display Typography */
.display-1 {
    font-size: var(--font-size-6xl);
    font-weight: var(--font-weight-extrabold);
    line-height: var(--line-height-tight);
    letter-spacing: var(--letter-spacing-tighter);
}

.display-2 {
    font-size: var(--font-size-5xl);
    font-weight: var(--font-weight-bold);
    line-height: var(--line-height-tight);
    letter-spacing: var(--letter-spacing-tight);
}

/* Improved List Styling */
.list-unstyled li {
    line-height: var(--line-height-relaxed);
    margin-bottom: 0.75rem;
}

/* Typography Utilities */
.font-medium {
    font-weight: var(--font-weight-medium);
}

.font-semibold {
    font-weight: var(--font-weight-semibold);
}

.tracking-tight {
    letter-spacing: var(--letter-spacing-tight);
}

.leading-relaxed {
    line-height: var(--line-height-relaxed);
}

/* Print Styles */
@media print {

    .navbar,
    .btn,
    footer {
        display: none !important;
    }

    body {
        padding-top: 0;
        font-size: 12pt;
        line-height: 1.4;
    }

    .hero-section {
        min-height: auto;
        padding: 2rem 0;
    }

    h1,
    h2,
    h3,
    h4,
    h5,
    h6 {
        page-break-after: avoid;
    }

    p,
    li {
        page-break-inside: avoid;
    }
}

/* TankSync Showcase Styles */
.tanksync-showcase {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.tanksync-showcase:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1) !important;
}

.screenshot-gallery img {
    transition: transform 0.3s ease;
}

.screenshot-gallery img:hover {
    transform: scale(1.05);
}

.features-list .bi-check-circle-fill {
    font-size: 1.1rem;
}

.showcase-actions .btn {
    transition: all 0.3s ease;
}

.showcase-actions .btn:hover {
    transform: translateY(-2px);
}

/* Mockup Showcase Styles */
.mockup-showcase img {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.mockup-showcase img:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.25) !important;
}

.hero-mockup img {
    transition: transform 0.3s ease;
}

.hero-mockup img:hover {
    transform: scale(1.05);
}