/**
 * MarineTechServices — Main Stylesheet
 *
 * Dark navy marine-tech aesthetic for the superyacht industry.
 *
 * Sections:
 *   1. Reset & CSS Variables
 *   2. Base Styles
 *   3. Navigation
 *   4. Hero
 *   5. Services
 *   6. Contact
 *   7. Footer
 *   8. Scroll Animations
 *   9. Responsive — Tablet (max-width: 1024px)
 *  10. Responsive — Mobile (max-width: 768px)
 *  11. Responsive — Small Mobile (max-width: 480px)
 *
 * @package MarineTechServices
 */


/* ==========================================================================
   1. Reset & CSS Variables
   ========================================================================== */

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-bg: #0B1D33;
    --secondary-bg: #132D4A;
    --accent: #00C9DB;
    --accent-hover: #00E5F0;
    --text-primary: #FFFFFF;
    --text-secondary: #A8B8CC;
    --card-bg: rgba(19, 45, 74, 0.8);
    --form-bg: #162F4D;
    --nav-height: 72px;
}


/* ==========================================================================
   2. Base Styles
   ========================================================================== */

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--primary-bg);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.3s;
}

a:hover {
    color: var(--accent-hover);
}

img {
    max-width: 100%;
    height: auto;
}


/* ==========================================================================
   3. Navigation
   ========================================================================== */

nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(11, 29, 51, 0.95);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0, 201, 219, 0.15);
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--nav-height);
}

.nav-brand {
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    text-decoration: none;
}

.nav-brand span {
    color: var(--accent);
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
    align-items: center;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--accent);
}

.nav-cta {
    background: var(--accent);
    color: var(--primary-bg) !important;
    padding: 0.5rem 1.25rem;
    border-radius: 6px;
    font-weight: 700 !important;
    transition: background 0.3s !important;
}

.nav-cta:hover {
    background: var(--accent-hover) !important;
    color: var(--primary-bg) !important;
}

/* Hamburger toggle button — hidden on desktop */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 110;
}

.hamburger {
    display: block;
    position: relative;
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: background 0.3s;
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    left: 0;
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: transform 0.3s, top 0.3s;
}

.hamburger::before {
    top: -7px;
}

.hamburger::after {
    top: 7px;
}

/* Hamburger open state — animates to X */
.nav-toggle[aria-expanded="true"] .hamburger {
    background: transparent;
}

.nav-toggle[aria-expanded="true"] .hamburger::before {
    top: 0;
    transform: rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .hamburger::after {
    top: 0;
    transform: rotate(-45deg);
}


/* ==========================================================================
   4. Hero
   ========================================================================== */

.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 8rem 2rem 4rem;
    background:
        linear-gradient(180deg, rgba(11, 29, 51, 0.7) 0%, rgba(11, 29, 51, 0.9) 100%),
        linear-gradient(135deg, #0B1D33 0%, #1a3a5c 50%, #0B1D33 100%);
    position: relative;
    overflow: hidden;
}

/* Animated cyan glow — simulates ocean light */
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 20% 80%, rgba(0, 201, 219, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(0, 201, 219, 0.05) 0%, transparent 50%);
    animation: pulse 8s ease-in-out infinite alternate;
}

@keyframes pulse {
    0%   { opacity: 0.5; }
    100% { opacity: 1; }
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    letter-spacing: -0.03em;
}

.hero h1 span {
    color: var(--accent);
}

.hero p {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.btn-primary {
    display: inline-block;
    background: var(--accent);
    color: var(--primary-bg);
    padding: 1rem 2.5rem;
    border-radius: 8px;
    font-weight: 700;
    font-size: 1rem;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
}

.btn-primary:hover {
    background: var(--accent-hover);
    color: var(--primary-bg);
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 201, 219, 0.3);
}


/* ==========================================================================
   5. Services
   ========================================================================== */

.services {
    padding: 6rem 2rem;
    background: var(--secondary-bg);
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
}

.section-header p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

.accent-line {
    width: 60px;
    height: 3px;
    background: var(--accent);
    margin: 1rem auto 0;
    border-radius: 2px;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.service-card {
    background: var(--card-bg);
    border: 1px solid rgba(0, 201, 219, 0.1);
    border-radius: 16px;
    padding: 2.5rem 2rem;
    text-align: center;
    transition: all 0.4s;
}

.service-card:hover {
    transform: translateY(-8px);
    border-color: rgba(0, 201, 219, 0.3);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.service-icon {
    width: 64px;
    height: 64px;
    background: rgba(0, 201, 219, 0.1);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 1.8rem;
    color: var(--accent);
}

.service-icon svg {
    stroke: var(--accent);
}

.service-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.service-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
}

.service-card .learn-more {
    display: inline-block;
    margin-top: 1.5rem;
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: color 0.3s;
}

.service-card .learn-more:hover {
    color: var(--accent-hover);
}


/* ==========================================================================
   6. Contact
   ========================================================================== */

.contact {
    padding: 6rem 2rem;
    background: var(--primary-bg);
}

.contact-wrapper {
    max-width: 600px;
    margin: 0 auto;
}

.contact-form {
    background: var(--form-bg);
    border: 1px solid rgba(0, 201, 219, 0.1);
    border-radius: 16px;
    padding: 3rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.875rem 1rem;
    background: rgba(11, 29, 51, 0.6);
    border: 1px solid rgba(168, 184, 204, 0.2);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.95rem;
    transition: border-color 0.3s;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: rgba(168, 184, 204, 0.5);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--accent);
}

.form-group textarea {
    min-height: 120px;
    resize: vertical;
}

.form-group select option {
    background: var(--secondary-bg);
    color: var(--text-primary);
}

.submit-btn {
    width: 100%;
    padding: 1rem;
    background: var(--accent);
    color: var(--primary-bg);
    font-family: inherit;
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.submit-btn:hover {
    background: var(--accent-hover);
    box-shadow: 0 8px 30px rgba(0, 201, 219, 0.3);
}

.submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Form status messages (success / error) */
.form-status {
    margin-top: 1rem;
    font-size: 0.9rem;
    text-align: center;
    min-height: 1.4em;
}

.form-status.success {
    color: #4ade80;
}

.form-status.error {
    color: #f87171;
}


/* ==========================================================================
   7. Footer
   ========================================================================== */

footer {
    padding: 3rem 2rem;
    background: var(--secondary-bg);
    border-top: 1px solid rgba(0, 201, 219, 0.1);
    text-align: center;
}

footer p {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

footer a {
    color: var(--accent);
    text-decoration: none;
}

footer a:hover {
    color: var(--accent-hover);
}


/* ==========================================================================
   8. Scroll Animations
   ========================================================================== */

.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}


/* ==========================================================================
   9. Responsive — Tablet (max-width: 1024px)
   ========================================================================== */

@media (max-width: 1024px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }

    .hero h1 {
        font-size: 2.75rem;
    }

    .section-header h2 {
        font-size: 2rem;
    }
}


/* ==========================================================================
   10. Responsive — Mobile (max-width: 768px)
   ========================================================================== */

@media (max-width: 768px) {
    /* Show hamburger */
    .nav-toggle {
        display: block;
    }

    /* Slide-out nav panel */
    .nav-links {
        position: fixed;
        top: 0;
        right: 0;
        width: 280px;
        height: 100vh;
        background: rgba(11, 29, 51, 0.98);
        -webkit-backdrop-filter: blur(16px);
        backdrop-filter: blur(16px);
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-start;
        padding: calc(var(--nav-height) + 2rem) 2rem 2rem;
        gap: 1.5rem;
        transform: translateX(100%);
        transition: transform 0.35s ease;
        border-left: 1px solid rgba(0, 201, 219, 0.15);
    }

    .nav-links.open {
        transform: translateX(0);
    }

    .nav-links a {
        font-size: 1rem;
    }

    .nav-cta {
        margin-top: 0.5rem;
        text-align: center;
        width: 100%;
        display: block;
        padding: 0.75rem 1.25rem;
    }

    /* Hero adjustments */
    .hero {
        padding: 7rem 1.5rem 3rem;
    }

    .hero h1 {
        font-size: 2.25rem;
    }

    .hero p {
        font-size: 1.05rem;
    }

    /* Services — stacked cards */
    .services {
        padding: 4rem 1.5rem;
    }

    .services-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    /* Contact adjustments */
    .contact {
        padding: 4rem 1.5rem;
    }

    .contact-form {
        padding: 2rem 1.5rem;
    }

    /* Section headers */
    .section-header {
        margin-bottom: 3rem;
    }

    .section-header h2 {
        font-size: 1.75rem;
    }

    .section-header p {
        font-size: 1rem;
    }
}


/* ==========================================================================
   11. Responsive — Small Mobile (max-width: 480px)
   ========================================================================== */

@media (max-width: 480px) {
    nav {
        padding: 0 1rem;
    }

    .hero {
        padding: 6rem 1rem 2.5rem;
    }

    .hero h1 {
        font-size: 1.75rem;
    }

    .hero p {
        font-size: 0.95rem;
        margin-bottom: 2rem;
    }

    .btn-primary {
        padding: 0.875rem 2rem;
        font-size: 0.9rem;
    }

    .services {
        padding: 3rem 1rem;
    }

    .service-card {
        padding: 2rem 1.5rem;
    }

    .contact {
        padding: 3rem 1rem;
    }

    .contact-form {
        padding: 1.5rem 1.25rem;
    }

    .section-header h2 {
        font-size: 1.5rem;
    }

    .section-header p {
        font-size: 0.9rem;
    }

    footer {
        padding: 2rem 1rem;
    }

    footer p {
        font-size: 0.8rem;
    }
}
