/* ===========================
   CMX Super Yacht Refit Center
   Design System & Styles
   =========================== */

/* --- Design Tokens --- */
:root {
    --color-bg-primary: #060d1a;
    --color-bg-secondary: #0c1a2e;
    --color-bg-card: rgba(12, 26, 46, 0.85);
    --color-bg-glass: rgba(255, 255, 255, 0.04);
    --color-gold: #c9a84c;
    --color-gold-light: #dcc06a;
    --color-gold-dark: #a68a3a;
    --color-white: #ffffff;
    --color-text: #ccd6e0;
    --color-text-muted: #7a8fa3;
    --color-border: rgba(201, 168, 76, 0.15);
    --color-border-light: rgba(255, 255, 255, 0.06);

    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;

    --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.3);
    --shadow-glow: 0 0 40px rgba(201, 168, 76, 0.1);

    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: var(--font-body);
    background: var(--color-bg-primary);
    color: var(--color-text);
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--color-white);
    line-height: 1.2;
}

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

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

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

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

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes shimmer {
    0% { background-position: -200% center; }
    100% { background-position: 200% center; }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

[data-animate] {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

[data-animate].visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- Navbar --- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 16px 0;
    transition: all var(--transition-normal);
}

.navbar.scrolled {
    padding: 8px 0;
    background: rgba(6, 13, 26, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--color-border);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

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

.nav-logo img {
    height: 40px;
    width: auto;
    transition: height var(--transition-normal);
}

.navbar.scrolled .nav-logo img {
    height: 32px;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 8px;
}

.nav-links a {
    padding: 8px 18px;
    border-radius: 100px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-text);
    transition: all var(--transition-fast);
    position: relative;
}

.nav-links a:hover {
    color: var(--color-gold);
    background: var(--color-bg-glass);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.lang-switch {
    display: flex;
    align-items: center;
    background: var(--color-bg-glass);
    border: 1px solid var(--color-border);
    border-radius: 100px;
    overflow: hidden;
    gap: 0;
}

.lang-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px 12px;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all var(--transition-fast);
    opacity: 0.45;
    filter: grayscale(80%);
}

.lang-btn:hover {
    opacity: 0.8;
    filter: grayscale(20%);
}

.lang-btn.active {
    opacity: 1;
    filter: grayscale(0%);
    background: rgba(201, 168, 76, 0.15);
}

.lang-btn img {
    display: block;
    border-radius: 2px;
}

.lang-divider {
    width: 1px;
    height: 16px;
    background: var(--color-border);
}

.lang-flag {
    font-size: 1.1rem;
}

.lang-flag {
    font-size: 1.1rem;
}

/* Hamburger */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.hamburger span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--color-white);
    border-radius: 2px;
    transition: all var(--transition-fast);
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* --- Hero --- */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-bg-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transform: scale(1.05);
    animation: fadeIn 1.5s ease forwards;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(6, 13, 26, 0.7) 0%,
        rgba(6, 13, 26, 0.5) 40%,
        rgba(6, 13, 26, 0.8) 100%
    );
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 120px 24px 80px;
    max-width: 900px;
    animation: fadeInUp 1s ease 0.3s both;
}

.hero-logo {
    width: 280px;
    margin: 0 auto 32px;
    filter: drop-shadow(0 4px 20px rgba(0, 0, 0, 0.5));
}

.hero h1 {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 20px;
    background: linear-gradient(135deg, var(--color-white) 0%, var(--color-gold-light) 50%, var(--color-gold) 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer 4s linear infinite;
}

.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: var(--color-text);
    max-width: 700px;
    margin: 0 auto 40px;
    font-weight: 300;
    line-height: 1.8;
}

.hero-cta {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 60px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    border-radius: 100px;
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-normal);
    border: none;
    text-transform: none;
    letter-spacing: 0.01em;
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-gold), var(--color-gold-dark));
    color: var(--color-bg-primary);
    box-shadow: 0 4px 20px rgba(201, 168, 76, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(201, 168, 76, 0.4);
    background: linear-gradient(135deg, var(--color-gold-light), var(--color-gold));
}

.btn-outline {
    background: transparent;
    color: var(--color-white);
    border: 1px solid rgba(255, 255, 255, 0.25);
}

.btn-outline:hover {
    border-color: var(--color-gold);
    color: var(--color-gold);
    background: rgba(201, 168, 76, 0.08);
    transform: translateY(-2px);
}

/* Hero Badges */
.hero-badges {
    display: flex;
    gap: 24px;
    justify-content: center;
    flex-wrap: wrap;
}

.badge {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--color-bg-glass);
    border: 1px solid var(--color-border);
    border-radius: 100px;
    font-size: 0.85rem;
    color: var(--color-text);
    backdrop-filter: blur(10px);
}

.badge i {
    color: var(--color-gold);
    font-size: 0.9rem;
}

/* Hero Scroll Indicator */
.hero-scroll {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1;
    animation: float 2s ease-in-out infinite;
}

.hero-scroll a {
    color: var(--color-gold);
    font-size: 1.5rem;
    opacity: 0.7;
    transition: opacity var(--transition-fast);
}

.hero-scroll a:hover {
    opacity: 1;
}

/* --- Section Common --- */
.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-tag {
    display: inline-block;
    padding: 6px 18px;
    background: rgba(201, 168, 76, 0.1);
    border: 1px solid var(--color-border);
    border-radius: 100px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--color-gold);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 16px;
}

.section-header h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    margin-bottom: 16px;
}

.section-desc {
    font-size: 1.05rem;
    color: var(--color-text-muted);
    max-width: 650px;
    margin: 0 auto;
    line-height: 1.8;
}

/* --- Services --- */
.services {
    padding: 120px 0;
    position: relative;
}

.services::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(201, 168, 76, 0.04) 0%, transparent 70%);
    pointer-events: none;
}

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

.service-card {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all var(--transition-slow);
    position: relative;
}

.service-card:hover {
    transform: translateY(-8px);
    border-color: var(--color-border);
    box-shadow: var(--shadow-card), var(--shadow-glow);
}

.service-img {
    position: relative;
    height: 220px;
    overflow: hidden;
}

.service-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.service-card:hover .service-img img {
    transform: scale(1.08);
}

.service-img::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: linear-gradient(transparent, var(--color-bg-card));
}

.service-icon {
    position: absolute;
    bottom: -20px;
    right: 24px;
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--color-gold), var(--color-gold-dark));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
    box-shadow: 0 4px 15px rgba(201, 168, 76, 0.3);
}

.service-icon i {
    color: var(--color-bg-primary);
    font-size: 1.1rem;
}

.service-body {
    padding: 28px 24px 24px;
}

.service-body h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.service-body p {
    font-size: 0.9rem;
    color: var(--color-text-muted);
    line-height: 1.7;
}

/* --- Winterization --- */
.winterization {
    position: relative;
    padding: 120px 0;
    overflow: hidden;
}

.winter-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.winter-bg-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.winter-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        90deg,
        rgba(6, 13, 26, 0.95) 0%,
        rgba(6, 13, 26, 0.85) 50%,
        rgba(6, 13, 26, 0.6) 100%
    );
}

.winter-content {
    position: relative;
    z-index: 1;
}

.winter-text {
    max-width: 650px;
}

.winter-text h2 {
    font-size: clamp(2rem, 4vw, 2.8rem);
    font-weight: 700;
    margin-bottom: 20px;
}

.winter-desc {
    font-size: 1.05rem;
    color: var(--color-text);
    line-height: 1.8;
    margin-bottom: 36px;
}

.winter-features {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 40px;
}

.winter-features li {
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.feature-icon {
    width: 44px;
    height: 44px;
    min-width: 44px;
    background: rgba(201, 168, 76, 0.12);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-gold);
    font-size: 1rem;
}

.winter-features li strong {
    display: block;
    color: var(--color-white);
    font-size: 0.95rem;
    margin-bottom: 2px;
}

.winter-features li span {
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

/* --- Location --- */
.location {
    padding: 120px 0;
    background: var(--color-bg-secondary);
}

.location-content {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 40px;
    align-items: start;
}

.map-container {
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--color-border-light);
    box-shadow: var(--shadow-card);
}

.map-container iframe {
    display: block;
}

.location-details {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.location-card {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 20px;
    background: var(--color-bg-card);
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-md);
    transition: all var(--transition-normal);
}

.location-card:hover {
    border-color: var(--color-border);
    box-shadow: var(--shadow-glow);
}

.location-card > i {
    color: var(--color-gold);
    font-size: 1.2rem;
    margin-top: 2px;
}

.location-card strong {
    display: block;
    color: var(--color-white);
    font-size: 0.9rem;
    margin-bottom: 4px;
}

.location-card span,
.location-card a {
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

.location-card a:hover {
    color: var(--color-gold);
}

/* --- Contact --- */
.contact {
    padding: 120px 0;
    position: relative;
}

.contact::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 800px;
    height: 400px;
    background: radial-gradient(circle, rgba(201, 168, 76, 0.04) 0%, transparent 70%);
    pointer-events: none;
}

.contact-form {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 32px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

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

.form-group label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--color-text);
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 12px 16px;
    background: var(--color-bg-card);
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-sm);
    color: var(--color-white);
    font-family: var(--font-body);
    font-size: 0.9rem;
    transition: all var(--transition-fast);
    outline: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--color-gold);
    box-shadow: 0 0 0 3px rgba(201, 168, 76, 0.1);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--color-text-muted);
}

.form-group select {
    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='%237a8fa3' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
    cursor: pointer;
}

.form-group select option {
    background: var(--color-bg-secondary);
    color: var(--color-white);
}

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

.btn-submit {
    width: 100%;
    justify-content: center;
    padding: 16px 32px;
    font-size: 1rem;
}

.btn-submit i {
    transition: transform var(--transition-fast);
}

.btn-submit:hover i {
    transform: translateX(4px);
}

/* --- Footer --- */
.footer {
    background: var(--color-bg-secondary);
    border-top: 1px solid var(--color-border-light);
    padding: 60px 0 0;
}

.footer-content {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 40px;
}

.footer-logo {
    width: 160px;
    margin-bottom: 16px;
}

.footer-brand p {
    font-size: 0.9rem;
    color: var(--color-text-muted);
    line-height: 1.7;
}

.footer-links h4,
.footer-contact h4 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--color-white);
}

.footer-links ul,
.footer-contact ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-links a {
    font-size: 0.9rem;
    color: var(--color-text-muted);
    transition: color var(--transition-fast);
}

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

.footer-contact li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    color: var(--color-text-muted);
}

.footer-contact i {
    color: var(--color-gold);
    font-size: 0.85rem;
    width: 16px;
}

.footer-contact a {
    color: var(--color-text-muted);
}

.footer-contact a:hover {
    color: var(--color-gold);
}

.footer-bottom {
    border-top: 1px solid var(--color-border-light);
    padding: 20px 0;
    text-align: center;
}

.footer-bottom p {
    font-size: 0.8rem;
    color: var(--color-text-muted);
}

/* ===========================
   RESPONSIVE
   =========================== */

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

    .services-grid .service-card:last-child {
        grid-column: 1 / -1;
        max-width: 500px;
        margin: 0 auto;
    }

    .location-content {
        grid-template-columns: 1fr;
    }

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

    .footer-content {
        grid-template-columns: 1fr 1fr;
    }

    .footer-brand {
        grid-column: 1 / -1;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(6, 13, 26, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 8px;
        z-index: 999;
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links a {
        font-size: 1.3rem;
        padding: 14px 30px;
    }

    .hamburger {
        display: flex;
        z-index: 1001;
    }

    .hero-logo {
        width: 200px;
    }

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

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

    .services-grid .service-card:last-child {
        max-width: none;
    }

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

    .winter-text {
        max-width: 100%;
    }

    .location-details {
        grid-template-columns: 1fr;
    }

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

    .footer-logo {
        margin: 0 auto 16px;
    }

    .footer-contact li {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .hero-content {
        padding: 100px 16px 60px;
    }

    .hero-logo {
        width: 160px;
    }

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

    .btn {
        width: 100%;
        justify-content: center;
    }

    .section-header {
        margin-bottom: 40px;
    }

    .services,
    .winterization,
    .location,
    .contact {
        padding: 80px 0;
    }
}
