:root {
    --primary: #0088ff;
    --primary-glow: rgba(0, 136, 255, 0.4);
    --bg-dark: #0a0c10;
    --bg-card: #151921;
    --bg-nav: rgba(10, 12, 16, 0.85);
    --text-primary: #ffffff;
    --text-secondary: #a0aec0;
    --accent: #00f2fe;
    --gradient: linear-gradient(135deg, #0088ff 0%, #00f2fe 100%);
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    --border: rgba(255, 255, 255, 0.1);
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
}

[data-theme="light"] {
    --bg-dark: #f6f8fa;
    --bg-card: #ffffff;
    --bg-nav: rgba(246, 248, 250, 0.85);
    --text-primary: #2b3137;
    --text-secondary: #57606a;
    --border: rgba(0, 0, 0, 0.1);
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    --primary: #0070f3;
    --gradient: linear-gradient(135deg, #0070f3 0%, #00dfd8 100%);
}

[data-theme="light"] .hero-bg {
    opacity: 0.6;
    mix-blend-mode: multiply;
    filter: brightness(1.2) contrast(0.9);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 40px;
}

.text-center { text-align: center; }

/* Header & Nav */
.header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: var(--bg-nav);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
}

.nav {
    height: 80px;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
}

.nav-left {
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.nav-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 15px;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: 2px;
    white-space: nowrap;
}

.logo span { color: var(--primary); }

.nav-links {
    display: flex;
    list-style: none;
    gap: 2.5rem;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover { color: var(--text-primary); }

/* Dropdown */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: var(--bg-card);
    min-width: 280px;
    box-shadow: var(--shadow);
    z-index: 1001;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 0.75rem 0;
    top: 100%;
    left: 0;
    margin-top: 5px; /* Minimal gap */
}

/* Hover Bridge to prevent vanishing */
.dropdown-content::before {
    content: '';
    position: absolute;
    top: -15px;
    left: 0;
    width: 100%;
    height: 15px;
    background: transparent;
}

/* Indicator Triangle */
.dropdown-content::after {
    content: '';
    position: absolute;
    top: -6px;
    left: 20px;
    width: 12px;
    height: 12px;
    background: var(--bg-card);
    border-left: 1px solid var(--border);
    border-top: 1px solid var(--border);
    transform: rotate(45deg);
}

.dropdown-content a {
    color: var(--text-secondary);
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    font-size: 0.9rem;
    transition: all 0.3s;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.dropdown-content a:last-child { border-bottom: none; }

.dropdown-content a:hover {
    background-color: rgba(0, 136, 255, 0.1);
    color: var(--primary);
    padding-left: 24px;
}

.dropdown:hover .dropdown-content {
    display: block;
    animation: fadeInDown 0.3s ease-out;
}

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

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

.btn-large { padding: 1rem 2rem; font-size: 1.1rem; }

.btn-primary {
    background: var(--gradient);
    color: white;
    box-shadow: 0 4px 15px var(--primary-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--primary-glow);
}

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

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.05);
}

/* Hero Section */
.hero {
    padding: 180px 0 100px;
    position: relative;
    overflow: hidden;
    min-height: 90vh;
    display: flex;
    align-items: center;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 1400px;
}

.hero-pretitle {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 4px;
    font-style: italic;
    background: var(--gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1rem;
    display: inline-block;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: 4rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.hero-title span {
    background: var(--gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    max-width: 800px;
}

.hero-cta {
    display: flex;
    gap: 1.5rem;
}

.hero-bg {
    position: absolute;
    top: 0;
    right: 0;
    width: 60%;
    height: 100%;
    background: linear-gradient(to right, var(--bg-dark) 0%, transparent 40%),
                url('../img/hero_bg.png') no-repeat center center;
    background-size: cover;
    z-index: 1;
    mask-image: linear-gradient(to left, black 60%, transparent 100%);
    -webkit-mask-image: linear-gradient(to left, black 60%, transparent 100%);
}

/* Tagline */
.tagline-section {
    padding: 4rem 0;
    background: rgba(255, 255, 255, 0.02);
}

.tagline {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 600;
    font-style: italic;
    background: var(--gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* About Section */
.about-section { padding: 100px 0; }

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.quote {
    margin-top: 2rem;
    padding-left: 1.5rem;
    border-left: 4px solid var(--primary);
    font-size: 1.2rem;
    font-style: italic;
    color: var(--text-secondary);
}

.comparison-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: var(--shadow);
}

.card-header {
    font-weight: 700;
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.comparison-list {
    list-style: none;
}

.comparison-list li {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.comparison-list li span:first-child { color: #f56565; }
.comparison-list li span:last-child { color: #48bb78; font-weight: 600; }

/* Solutions Section */
.solutions-section {
    padding: 100px 0;
    background: #0d1117;
}

.section-subtitle {
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto 4rem;
}

.solutions-tree {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
}

.solution-category {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2rem;
    transition: all 0.3s;
}

.solution-category:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
}

.solution-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.solution-header .icon {
    width: 40px;
    height: 40px;
}

.placeholder-icon {
    font-size: 2rem;
}

.solution-body .alignment {
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 1rem;
    font-size: 0.9rem;
    text-transform: uppercase;
}

.solution-body ul {
    list-style: none;
    color: var(--text-secondary);
}

.solution-body ul li {
    padding: 0.25rem 0;
    position: relative;
    padding-left: 1.2rem;
}

.solution-body ul li::before {
    content: "•";
    color: var(--primary);
    position: absolute;
    left: 0;
}

.iso-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.iso-list span {
    background: rgba(0, 136, 255, 0.1);
    color: var(--primary);
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* Capabilities */
.capabilities-section { padding: 100px 0; }

.capability-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.capability-item {
    background: rgba(255, 255, 255, 0.03);
    padding: 2rem;
    border-radius: 12px;
    border-top: 3px solid var(--primary);
}

/* Industry Section */
.industry-section {
    padding: 80px 0;
    background: #11151c;
}

.industry-list {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-top: 3rem;
}

.industry-badge {
    padding: 1rem 2rem;
    background: rgba(0, 136, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 50px;
    font-weight: 500;
    transition: all 0.3s;
}

.industry-badge:hover {
    border-color: var(--primary);
    background: rgba(0, 136, 255, 0.1);
}

/* Power Platform Section */
.power-platform-section {
    padding: 100px 0;
    background: linear-gradient(135deg, var(--bg-dark) 0%, #1a202c 100%);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.power-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 4rem;
    align-items: center;
}

.power-list {
    margin-top: 2.5rem;
    display: grid;
    gap: 2rem;
}

.power-feature {
    background: var(--bg-card);
    padding: 1.5rem;
    border-radius: 12px;
    border-left: 4px solid var(--primary);
}

.power-feature strong {
    display: block;
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--primary);
}

.power-visual {
    display: flex;
    justify-content: center;
}

.power-badge-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.power-badge {
    padding: 1.5rem 3rem;
    background: var(--bg-card);
    border: 1px solid var(--primary);
    border-radius: 16px;
    font-weight: 800;
    font-family: var(--font-heading);
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 2px;
    box-shadow: 0 0 20px var(--primary-glow);
    animation: pulse 3s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); box-shadow: 0 0 10px var(--primary-glow); }
    50% { transform: scale(1.02); box-shadow: 0 0 25px var(--primary-glow); }
    100% { transform: scale(1); box-shadow: 0 0 10px var(--primary-glow); }
}

/* Roadmap */
.roadmap-section { padding: 100px 0; }

.roadmap-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    margin-top: 3rem;
}

.roadmap-item {
    padding: 2rem;
    border-radius: 12px;
    background: var(--bg-card);
    position: relative;
}

.roadmap-item .phase {
    font-weight: 800;
    margin-bottom: 1rem;
    font-size: 1rem;
    color: var(--primary);
}

.phase-1 { border-top: 4px solid #48bb78; }
.phase-2 { border-top: 4px solid #f6ad55; }
.phase-3 { border-top: 4px solid #4299e1; }
.phase-4 { border-top: 4px solid #f56565; }

.roadmap-item ul { list-style: none; color: var(--text-secondary); font-size: 0.9rem; }

/* Who is Xelify For */
.who-is-section { padding: 100px 0; }
.who-is-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 3rem;
}
.who-is-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 1.5rem 2.5rem;
    border-radius: 12px;
    font-weight: 600;
    transition: all 0.3s;
}
.who-is-item:hover {
    border-color: var(--primary);
    transform: scale(1.05);
}

.big-idea {
    padding: 100px 0;
    border-top: 1px solid var(--border);
}

.big-idea p {
    font-size: 1.5rem;
    color: var(--text-secondary);
    max-width: 900px;
    margin: 2rem auto 0;
}

/* Final CTA */
.cta-final {
    padding: 120px 0;
    background: linear-gradient(to bottom, var(--bg-dark), rgba(0, 136, 255, 0.1), var(--bg-dark));
}

/* Mermaid Theming Fix */
.mermaid svg {
    font-family: var(--font-body) !important;
}

.mermaid .node rect, 
.mermaid .node circle, 
.mermaid .node ellipse, 
.mermaid .node polygon, 
.mermaid .node path {
    fill: var(--bg-card) !important;
    stroke: var(--primary) !important;
    stroke-width: 1.5px !important;
}

.mermaid .node .label {
    color: var(--text-primary) !important;
    fill: var(--text-primary) !important;
}

.mermaid .node.solutions rect, 
.mermaid .node.solutions circle {
    fill: var(--primary) !important;
    stroke: var(--primary) !important;
}

.mermaid .node.solutions .label {
    color: #ffffff !important;
    fill: #ffffff !important;
}

.mermaid .edgePath .path {
    stroke: var(--text-secondary) !important;
    stroke-width: 1.5px !important;
}

.mermaid .marker {
    fill: var(--text-secondary) !important;
    stroke: none !important;
}

.cta-final h2 { font-size: 3rem; margin-bottom: 2rem; }
.cta-final p { font-size: 1.25rem; color: var(--text-secondary); margin-bottom: 3rem; }

/* Footer */
.footer {
    padding: 4rem 0;
    border-top: 1px solid var(--border);
    color: var(--text-secondary);
}

/* Responsive */
@media (max-width: 1024px) {
    .power-grid { grid-template-columns: 1fr; gap: 2rem; }
    .power-visual { order: -1; margin-bottom: 2rem; }
    .power-badge-container { flex-direction: row; flex-wrap: wrap; justify-content: center; }
}

@media (max-width: 968px) {
    .hero-title { font-size: 3rem; }
    .about-grid { grid-template-columns: 1fr; }
    .roadmap-grid { grid-template-columns: repeat(2, 1fr); }
    .nav { grid-template-columns: 1fr 1fr; }
    .nav-links { display: none; } /* Hide complicated nav earlier for better fit */
}

@media (max-width: 768px) {
    .nav-links { display: none; }
    .nav { display: flex; justify-content: space-between; }
    .hero-title { font-size: 2.5rem; }
    .hero-subtitle { font-size: 1.1rem; }
    .roadmap-grid { grid-template-columns: 1fr; }
    .hero-cta { flex-direction: column; }
    .hero-bg { width: 100%; opacity: 0.3; }
    .hero { text-align: center; }
    .hero-content { margin: 0 auto; }
    .hero-cta { align-items: center; }
    .container { padding: 0 20px; }
}
