:root {
    --font-inter: 'Inter', sans-serif;
    --font-serif: 'DM Serif Display', serif;
    --bg-primary: #0f1117;
    --bg-secondary: #161922;
    --bg-card: #1c2030;
    --bg-card-hover: #222738;
    --accent: #4a9eff;
    --accent-muted: #3d6fa8;
    --accent-warm: #c9a962;
    --text-primary: #f0f2f5;
    --text-secondary: #9aa3b2;
    --text-muted: #6b7280;
    --border: #2a3040;
    --border-light: #353d50;
}

html, body {
    height: 100%;
    margin: 0;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-inter, 'Inter', sans-serif);
    -webkit-font-smoothing: antialiased;
}

body > div {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

#main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Navigation */
#nav {
    background-color: rgba(15, 17, 23, 0.95);
    backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    display: flex;
    width: 100%;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    padding: 0.75rem 2rem;
    border-bottom: 1px solid var(--border);
    z-index: 1000;
    height: 72px;
}

.mobile-nav-panel {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: var(--bg-secondary);
    border-top: 1px solid var(--border);
    display: flex;
    flex-direction: column;
}

.mobile-nav-panel[hidden] {
    display: none !important;
}

.alert {
    border-radius: 8px;
    padding: 0.85rem 1rem;
    margin-top: 1rem;
}

.alert-success {
    background-color: rgba(74, 158, 255, 0.12);
    border: 1px solid var(--accent-muted);
    color: var(--text-primary);
}

.alert-danger {
    background-color: rgba(220, 53, 69, 0.12);
    border: 1px solid #8b3a44;
    color: #ffb4bc;
}

#site-title {
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

#logo-img {
    border-radius: 4px;
}

.nav-link-custom {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    padding: 0.5rem 1rem;
    transition: color 0.2s ease;
    border-radius: 6px;
}

.nav-link-custom:hover {
    color: var(--text-primary);
}

.nav-link-external {
    color: var(--accent);
}

.nav-link-external:hover {
    color: #7bb8ff;
}

.nav-dropdown {
    position: relative;
}

.nav-dropdown-toggle {
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.nav-dropdown-toggle::after {
    content: '';
    border: 4px solid transparent;
    border-top-color: currentColor;
    margin-top: 3px;
    transition: transform 0.2s ease;
}

.nav-dropdown:hover .nav-dropdown-toggle::after,
.nav-dropdown:focus-within .nav-dropdown-toggle::after {
    transform: rotate(180deg);
}

.nav-dropdown-menu {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    min-width: 180px;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.35rem 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    z-index: 1001;
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-dropdown-item {
    display: block;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.6rem 1rem;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.nav-dropdown-item:hover {
    background-color: var(--bg-card);
    color: var(--text-primary);
}

.mobile-nav-item {
    padding: 1rem 1.5rem !important;
    border-bottom: 1px solid var(--border);
}

.mobile-nav-label {
    display: block;
    padding: 1rem 1.5rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
}

.mobile-nav-subitem {
    padding-left: 2.25rem !important;
    font-size: 0.95rem;
}

/* Typography */
h1, h2, h3 {
    font-family: var(--font-serif, 'DM Serif Display', serif);
    font-weight: 400;
    letter-spacing: -0.02em;
}

h1 {
    color: var(--text-primary);
    font-size: clamp(2rem, 5vw, 3rem);
    line-height: 1.15;
}

h2 {
    color: var(--text-primary);
    font-size: clamp(1.5rem, 3vw, 2rem);
}

h3, h4, h5, h6 {
    font-family: var(--font-inter, 'Inter', sans-serif);
    font-weight: 600;
    color: var(--text-primary);
}

.section-label {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 0.75rem;
}

/* Hero */
.hero-section {
    background: linear-gradient(160deg, var(--bg-primary) 0%, #12151f 40%, #0d1525 100%);
    border-bottom: 1px solid var(--border);
    padding: 5rem 0 6rem;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 60%;
    height: 150%;
    background: radial-gradient(ellipse, rgba(74, 158, 255, 0.06) 0%, transparent 70%);
    pointer-events: none;
}

.hero-tagline {
    font-size: clamp(1.1rem, 2.5vw, 1.35rem);
    color: var(--text-secondary);
    max-width: 640px;
    line-height: 1.65;
    font-weight: 400;
}

.hero-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background-color: var(--accent);
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: 8px;
    transition: background-color 0.2s ease, transform 0.2s ease;
    border: none;
}

.hero-cta:hover {
    background-color: #3d8ae6;
    color: #fff;
    transform: translateY(-1px);
}

.hero-cta-secondary {
    background-color: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-light);
}

.hero-cta-secondary:hover {
    background-color: var(--bg-card);
    border-color: var(--accent-muted);
    color: var(--text-primary);
}

/* Content sections */
#content-container {
    color: var(--text-main);
    background-color: var(--bg-primary);
    width: 100%;
}

.content-section {
    padding: 5rem 0;
}

.thesis-section {
    padding: 4rem 0;
    border-bottom: 1px solid var(--border);
}

.content-section-alt {
    background-color: var(--bg-secondary);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.section-intro {
    color: var(--text-secondary);
    font-size: 1.1rem;
    max-width: 600px;
    line-height: 1.7;
}

/* Product cards */
.product-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 2rem;
    height: 100%;
    transition: border-color 0.25s ease, background-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
    display: flex;
    flex-direction: column;
    position: relative;
    cursor: default;
}

.product-card:hover {
    border-color: var(--accent-muted);
    background-color: var(--bg-card-hover);
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
}

.product-card-ludex:hover {
    border-color: var(--accent);
}

.product-card-canonvale:hover {
    border-color: var(--accent-warm);
}

.product-card-ludex {
    border-top: 3px solid var(--accent);
}

.product-card-canonvale {
    border-top: 3px solid var(--accent-warm);
}

.product-badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0.25rem 0.6rem;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.product-badge-ludex {
    background-color: rgba(74, 158, 255, 0.12);
    color: var(--accent);
}

.product-badge-canonvale {
    background-color: rgba(201, 169, 98, 0.12);
    color: var(--accent-warm);
}

.product-card h3 {
    font-family: var(--font-serif, 'DM Serif Display', serif);
    font-size: 1.75rem;
    font-weight: 400;
    margin-bottom: 0.75rem;
}

.product-card p {
    color: var(--text-secondary);
    line-height: 1.65;
    margin-bottom: 0;
}

.product-summary {
    flex: 1;
}

.product-hover-hint {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 1rem;
    transition: opacity 0.2s ease;
}

.product-card:hover .product-hover-hint {
    opacity: 0;
}

.product-details {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, opacity 0.3s ease, margin 0.3s ease;
    margin-top: 0;
}

.product-card:hover .product-details,
.product-card:focus-within .product-details {
    max-height: 320px;
    opacity: 1;
    margin-top: 1.25rem;
}

.product-details-title {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.product-details-list {
    list-style: none;
    padding: 0;
    margin: 0 0 1rem;
}

.product-details-list li {
    position: relative;
    padding-left: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.92rem;
    line-height: 1.5;
}

.product-details-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.55em;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background-color: var(--accent);
}

.product-card-canonvale .product-details-list li::before {
    background-color: var(--accent-warm);
}

.product-card-footer {
    margin-top: auto;
    padding-top: 1.5rem;
}

@media (hover: none) {
    .product-hover-hint {
        display: none;
    }

    .product-details {
        max-height: none;
        opacity: 1;
        margin-top: 1.25rem;
    }
}

.product-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: gap 0.2s ease;
}

.product-link:hover {
    color: #7bb8ff;
    gap: 0.65rem;
}

.product-link-canonvale {
    color: var(--accent-warm);
}

.product-link-canonvale:hover {
    color: #dfc07a;
}

/* About / values */
.value-item {
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--border);
}

.value-item:last-child {
    border-bottom: none;
}

.value-item h4 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.value-item p {
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.6;
    font-size: 0.95rem;
}

/* Legacy card styles (team, contact) */
.card {
    background-color: var(--bg-card) !important;
    border: 1px solid var(--border) !important;
    color: var(--text-primary);
    border-radius: 12px !important;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.card-title {
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-family: var(--font-serif, 'DM Serif Display', serif);
    font-weight: 400;
}

.card-text {
    color: var(--text-secondary);
}

.page-spacer {
    padding-top: 3rem;
    padding-bottom: 4rem;
}

#latest-news {
    padding-top: 3rem;
    padding-bottom: 4rem;
}

/* Contact form */
#form-section {
    padding-bottom: 4rem;
}

#contact-label, .form-label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 0.4rem;
}

.form-control {
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-primary);
    border-radius: 8px;
    padding: 0.65rem 0.85rem;
}

.form-control:focus {
    background-color: var(--bg-card);
    color: var(--text-primary);
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(74, 158, 255, 0.15);
}

.btn-submit {
    background-color: var(--accent);
    color: #fff;
    border: none;
    padding: 0.75rem 2rem;
    font-weight: 600;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: background-color 0.2s ease;
}

.btn-submit:hover {
    background-color: #3d8ae6;
    color: #fff;
}

/* Footer */
#footer-container {
    background-color: var(--bg-secondary);
    border-top: 1px solid var(--border);
    width: 100%;
    margin-top: auto;
    padding: 3rem 0 2rem;
}

.footer-brand {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.footer-tagline {
    color: var(--text-muted);
    font-size: 0.875rem;
    max-width: 320px;
    line-height: 1.5;
}

.footer-heading {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.footer-link {
    display: block;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    padding: 0.25rem 0;
    transition: color 0.2s ease;
}

.footer-link:hover {
    color: var(--text-primary);
}

#footer-container-bottom {
    background-color: var(--bg-primary);
    color: var(--text-muted);
    text-align: center;
    font-size: 0.85rem;
    border-top: 1px solid var(--border);
    padding: 1.25rem 0;
}

#footer-container-bottom h4 {
    font-size: 0.85rem;
    font-weight: 400;
    color: var(--text-muted);
    margin: 0;
}

/* Mobile burger */
.burger-menu {
    display: none;
}

.burger-bar {
    width: 1.5rem;
    height: 2px;
    background-color: var(--text-secondary);
    border-radius: 2px;
    margin: 3px 0;
    transition: 0.3s;
}

.burger-bar.clicked {
    background-color: var(--accent) !important;
}

@media (max-width: 991px) {
    #nav {
        padding: 0.75rem 1.25rem;
    }

    .burger-menu {
        display: flex;
        flex-direction: column;
        cursor: pointer;
        z-index: 1001;
    }

    .d-lg-flex {
        display: none !important;
    }

    .hero-section {
        padding: 3.5rem 0 4rem;
    }

    .content-section {
        padding: 3.5rem 0;
    }
}
