/* VesselSense Website Styles */

/* CSS Variables - Matching live site (vesselsense.io) */
:root {
    --navy: #1e293b;
    --dark-navy: #0f172a;
    --teal: #14b8a6;          /* Original brand teal - links, accents */
    --teal-light: #5eead4;    /* Hover state */
    --text-gray: #475569;     /* Body text - 8.6:1 contrast (AAA) */
    --light-gray: #cbd5e1;    /* Secondary text */
    --lighter-gray: #f8fafc;  /* Backgrounds */
    --border-gray: #334155;   /* Borders */
    --white: #ffffff;
}

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

html {
    scroll-padding-top: 140px; /* Offset for sticky header + subnav */
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--text-gray);  /* Gray text like live site */
    background: var(--white);
}

/* Header Styles */
header {
    background: var(--white);
    color: var(--navy);
    padding: 1rem 2rem;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border-bottom: 1px solid var(--border-gray);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: opacity 0.3s;
}

.logo img {
    height: 60px;
    width: auto;
}

.logo:hover {
    opacity: 0.8;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0.5rem;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--navy);
    margin: 3px 0;
    transition: 0.3s;
}

nav {
    display: flex;
    gap: 2rem;
}

nav a {
    color: var(--navy);
    text-decoration: none;
    transition: color 0.3s;
    font-weight: 500;
    padding: 0.5rem 0;
    border-bottom: 2px solid transparent;
}

nav a:hover {
    color: var(--teal);
}

nav a.active {
    border-bottom-color: var(--teal);
}

/* Mobile Menu */
.mobile-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    padding: 1rem;
    box-shadow: 0 5px 10px rgba(0,0,0,0.2);
    border-top: 1px solid var(--border-gray);
}

.mobile-menu.active {
    display: block;
}

.mobile-menu a {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--navy);
    text-decoration: none;
    border-bottom: 1px solid var(--border-gray);
    transition: background 0.3s, color 0.3s;
}

.mobile-menu a:hover {
    background: rgba(20, 184, 166, 0.1);
    color: var(--teal);
}

.mobile-menu a.active {
    background: rgba(20, 184, 166, 0.1);
    color: var(--teal);
    border-left: 3px solid var(--teal);
}

/* Subnav */
.subnav {
    position: sticky;
    top: 77px; /* Below sticky header */
    z-index: 900;
    background: var(--white);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    margin: 0 -2rem;
    padding: 0 2rem;
}

.subnav-track {
    display: flex;
    gap: 0.5rem;
    padding: 1.125rem 0 0.75rem;
    overflow-x: auto;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE */
    max-width: 1400px;
    margin: 0 auto;
}

.subnav-track::-webkit-scrollbar {
    display: none; /* Chrome, Safari */
}

.subnav-chip {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    padding: 0.4rem 1rem;
    border-radius: 100px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-gray);
    background: var(--lighter-gray);
    border: 1px solid transparent;
    text-decoration: none;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.subnav-chip:hover {
    color: var(--navy);
    background: rgba(20, 184, 166, 0.08);
    border-color: var(--teal);
}

.subnav-chip.active {
    color: var(--navy);
    background: rgba(20, 184, 166, 0.12);
    border-color: var(--teal);
    font-weight: 600;
}

/* Main Content */
main {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
    min-height: calc(100vh - 200px);
}

section {
    margin-bottom: 3rem;
    padding: 2rem;
    background: var(--lighter-gray);
    border-radius: 8px;
}

/* Page Header */
.page-header {
    background: linear-gradient(135deg, var(--navy) 0%, var(--dark-navy) 100%);
    color: var(--white);
    text-align: center;
    padding: 3rem 2rem;
    border-radius: 8px;
}

.page-header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--white) 0%, var(--teal) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.page-header p {
    font-size: 1.2rem;
    color: var(--light-gray);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--navy) 0%, var(--dark-navy) 100%);
    color: var(--white);
    text-align: center;
    padding: 4rem 2rem;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--white) 0%, var(--teal) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--teal);  /* Pure teal like live site tagline */
    margin-bottom: 1rem;
    font-weight: 600;
}

.hero-description {
    font-size: 1.1rem;
    color: var(--light-gray);
    max-width: 800px;
    margin: 0 auto 2rem;
}

.hero-description a {
    color: var(--teal-light);
    text-decoration: underline;
    text-decoration-color: rgba(94, 234, 212, 0.4);
    text-underline-offset: 2px;
}

.hero-description a:hover {
    color: var(--white);
}

.hero-cta {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Typography */
h1 {
    font-size: 2.5rem;
    color: var(--navy);  /* Keep navy for regular h1 */
    margin-bottom: 1rem;
    font-weight: 700;
}

h2 {
    font-size: 2rem;
    color: var(--navy);
    margin-bottom: 1rem;
    border-bottom: 3px solid var(--teal);
    padding-bottom: 0.5rem;
    position: relative;
    scroll-margin-top: 140px; /* Offset for sticky header + subnav */
}

/* Linkable H2 and H3 anchor styles */
h2 .anchor-link,
h3 .anchor-link {
    position: absolute;
    left: -1.75rem;
    opacity: 0;
    transition: opacity 0.2s ease;
    text-decoration: none;
    color: var(--teal);
    line-height: 1;
    padding: 0.25rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
}

h2:hover .anchor-link,
h3:hover .anchor-link {
    opacity: 1;
}

h2 .anchor-link:hover,
h3 .anchor-link:hover {
    color: var(--teal-light);
}

h2 .anchor-link:active,
h3 .anchor-link:active {
    transform: scale(0.95);
}

/* Link icon SVG */
h2 .anchor-link svg,
h3 .anchor-link svg {
    width: 1.25rem;
    height: 1.25rem;
}

h3 .anchor-link svg {
    width: 1rem;
    height: 1rem;
}

/* Copied tooltip */
h2 .anchor-link .copied-tooltip,
h3 .anchor-link .copied-tooltip {
    position: absolute;
    left: -4rem;
    top: -2rem;
    background: var(--navy);
    color: var(--white);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

h2 .anchor-link .copied-tooltip.show,
h3 .anchor-link .copied-tooltip.show {
    opacity: 1;
}

/* Mobile: always show anchor links, position differently */
@media (max-width: 768px) {
    h2 .anchor-link,
    h3 .anchor-link {
        opacity: 0.4;
        position: static;
        margin-left: 0.5rem;
    }

    h2:hover .anchor-link,
    h3:hover .anchor-link,
    h2 .anchor-link:active,
    h3 .anchor-link:active {
        opacity: 1;
    }
}

h3 {
    font-size: 1.5rem;
    color: var(--navy);
    margin-bottom: 0.75rem;
    margin-top: 1.5rem;
    position: relative;
    scroll-margin-top: 140px; /* Offset for sticky header + subnav */
}

p {
    margin-bottom: 1rem;
    color: var(--text-gray);
}

ul, ol {
    margin-bottom: 1rem;
    padding-left: 2rem;
    color: var(--text-gray);
}

li {
    margin-bottom: 0.5rem;
}

a {
    color: var(--teal);  /* Teal links like live site */
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--teal-light);  /* Lighter teal hover like live site */
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    border: 2px solid transparent;
}

.btn-primary {
    background: var(--teal);
    color: var(--navy);
    font-weight: 700;
}

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

.btn-secondary {
    background: transparent;
    color: var(--navy);
    border-color: var(--navy);
}

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

/* Secondary button on dark backgrounds */
.hero .btn-secondary,
.cta-section .btn-secondary,
.page-header .btn-secondary {
    color: var(--white);
    border-color: var(--white);
}

.hero .btn-secondary:hover,
.cta-section .btn-secondary:hover,
.page-header .btn-secondary:hover {
    background: var(--white);
    color: var(--navy);
}

/* Services Grid */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.service-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: transform 0.3s, box-shadow 0.3s;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.service-card h3 {
    color: var(--navy);  /* Navy - teal is accent only */
    margin-top: 0;
    font-weight: 700;
}

.service-card a {
    font-weight: 600;
    color: var(--teal);
}

.service-card a:hover {
    color: var(--teal-light);
}

/* Benefits List */
.benefits-list {
    list-style: none;
    padding-left: 0;
}

.benefits-list li {
    padding-left: 1.5rem;
    position: relative;
}

.benefits-list li::before {
    content: "✓";
    color: var(--teal);
    font-weight: bold;
    position: absolute;
    left: 0;
}

/* Why Section */
.why-section {
    background: var(--white);
}

/* Contact Grid */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.contact-method {
    background: var(--white);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: transform 0.3s, box-shadow 0.3s;
}

.contact-method:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.contact-method h3 {
    color: var(--navy);  /* Navy - teal is accent only */
    margin-top: 0;
    font-weight: 700;
}

/* CTA Section */
.cta-section {
    background: linear-gradient(135deg, var(--navy) 0%, var(--dark-navy) 100%);
    color: var(--white);
    text-align: center;
    padding: 3rem 2rem;
}

.cta-section h2 {
    color: var(--white) !important;
    border-bottom: 3px solid var(--teal);
}

.cta-section p {
    color: var(--light-gray);
}

/* Footer */
footer {
    background: var(--navy);
    color: var(--white);
    padding: 3rem 2rem 1rem;
    margin-top: 4rem;
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    color: var(--teal);  /* Large heading - original teal OK at 3:1 */
    margin-bottom: 1rem;
}

.footer-section p {
    color: var(--light-gray);
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: var(--light-gray);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: var(--teal);  /* Original teal for hover - visible change */
}

/* Social Media Icons */
.social-links {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.social-icon {
    width: 24px;
    height: 24px;
    color: var(--light-gray);
    transition: all 0.3s ease;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: rgba(20, 184, 166, 0.1);
}

.social-links a:hover .social-icon {
    color: var(--teal);
    transform: translateY(-2px);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: var(--light-gray);
}

/* Scroll to Top Button */
.scroll-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--teal);
    color: var(--white);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
    font-weight: 700;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    z-index: 999;
}

.scroll-top.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-top:hover {
    background: var(--teal-light);
    transform: translateY(-5px);
}

/* Responsive Breakpoints */
@media (max-width: 768px) {
    header {
        padding: 1rem;
    }

    .hamburger {
        display: flex;
    }

    header nav {
        display: none;
    }

    main {
        padding: 1rem;
    }

    section {
        padding: 1.5rem;
    }

    .hero {
        padding: 2rem 1rem;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1.25rem;
    }

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

    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    h3 {
        font-size: 1.25rem;
    }

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

    .hero-cta {
        flex-direction: column;
        align-items: center;
    }

    .hero-cta .btn {
        width: 100%;
        max-width: 300px;
    }

    .subnav {
        top: 57px; /* Smaller header on mobile */
        margin: 0 -1rem;
        padding: 0 1rem;
    }

    .subnav-track {
        gap: 0.375rem;
        padding: 0.5rem 0;
    }

    .subnav-chip {
        padding: 0.35rem 0.75rem;
        font-size: 0.8125rem;
    }

    .scroll-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }

    .footer-container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .social-links {
        justify-content: center;
    }
}

@media (min-width: 769px) {
    .subnav-track {
        justify-content: center;
        gap: 0.625rem;
    }

    .subnav-chip {
        padding: 0.5rem 1.25rem;
        font-size: 0.9375rem;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    main {
        padding: 1.5rem;
    }

    section {
        padding: 1.75rem;
    }
}
