/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

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

:root {
    --bg-dark: #030712;         /* Pitch black with slate tint */
    --bg-deep: #090e1a;         /* Deep tech navy */
    --bg-card: rgba(15, 23, 42, 0.45); /* Translucent slate grid */
    --bg-card-hover: rgba(30, 41, 59, 0.6);
    --primary: #38bdf8;         /* Electric sky blue */
    --primary-glow: rgba(56, 189, 248, 0.15);
    --secondary: #0ea5e9;       /* Tech blue */
    --accent: #22d3ee;          /* Cyber cyan */
    --accent-glow: rgba(34, 211, 238, 0.1);
    --text: #f8fafc;            /* Crisp slate 50 */
    --text-muted: #94a3b8;      /* Slate 400 */
    --text-dark: #64748b;       /* Slate 500 */
    --border: rgba(56, 189, 248, 0.12);
    --border-hover: rgba(56, 189, 248, 0.4);
    --radius-sm: 12px;
    --radius-md: 20px;
    --radius-lg: 28px;
    --shadow: 0 16px 48px -12px rgba(3, 7, 18, 0.8),
              0 0 24px -4px rgba(56, 189, 248, 0.05);
    --shadow-glow: 0 0 30px rgba(56, 189, 248, 0.2);
    --transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

body {
    min-height: 100vh;
    background-color: var(--bg-dark);
    color: var(--text);
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    line-height: 1.625;
    overflow-x: hidden;
    position: relative;
}

/* Custom Selection */
body::selection {
    background: rgba(56, 189, 248, 0.3);
    color: #ffffff;
}

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

.container {
    width: min(1200px, calc(100% - 48px));
    margin: 0 auto;
}

/* Ambient Radial Glows in Background */
.bg-glow-container {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.bg-glow-1, .bg-glow-2, .bg-glow-3 {
    position: absolute;
    border-radius: 50%;
    filter: blur(140px);
    opacity: 0.12;
    will-change: transform;
}

.bg-glow-1 {
    width: 500px;
    height: 500px;
    background: var(--primary);
    top: 5%;
    left: -150px;
    animation: floatGlow 20s infinite alternate;
}

.bg-glow-2 {
    width: 600px;
    height: 600px;
    background: var(--accent);
    bottom: 15%;
    right: -200px;
    animation: floatGlow 25s infinite alternate-reverse;
}

.bg-glow-3 {
    width: 400px;
    height: 400px;
    background: var(--secondary);
    top: 45%;
    left: 35%;
    animation: floatGlow 18s infinite alternate;
}

@keyframes floatGlow {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(60px, 40px) scale(1.1); }
    100% { transform: translate(-40px, -60px) scale(0.95); }
}

/* Header & Glass Navbar */
.header {
    position: fixed;
    inset: 0 0 auto;
    z-index: 100;
    background: rgba(3, 7, 18, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    transition: var(--transition);
}

.header.scrolled {
    background: rgba(3, 7, 18, 0.85);
    border-bottom: 1px solid rgba(56, 189, 248, 0.25);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.navbar, .nav-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
}

.logo-img {
    width: 34px;
    height: 34px;
    object-fit: contain;
    filter: drop-shadow(0 0 8px rgba(56, 189, 248, 0.4));
    transition: var(--transition);
}

.logo:hover .logo-img {
    transform: rotate(15deg) scale(1.08);
}

.logo-text {
    color: var(--text);
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #ffffff 30%, var(--primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
    padding: 0.25rem 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1.5px;
    background: var(--primary);
    transition: var(--transition);
}

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

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-link.active {
    color: var(--primary);
    font-weight: 600;
}

.nav-btn {
    padding: 0.6rem 1.25rem;
    font-size: 0.85rem;
}

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

#hero-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.65;
    pointer-events: none;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 4rem;
    align-items: center;
}

.hero-content {
    max-width: 680px;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1.1rem;
    border-radius: 99px;
    border: 1px solid var(--border);
    background: rgba(56, 189, 248, 0.06);
    color: var(--primary);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    margin-bottom: 2rem;
    backdrop-filter: blur(4px);
}

.badge-dot {
    width: 6px;
    height: 6px;
    background-color: var(--primary);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--primary);
    animation: pulseGlowDot 1.5s infinite;
}

@keyframes pulseGlowDot {
    0% { opacity: 0.4; transform: scale(0.9); }
    50% { opacity: 1; transform: scale(1.2); }
    100% { opacity: 0.4; transform: scale(0.9); }
}

.hero-title {
    font-size: clamp(2.8rem, 5.5vw, 4.2rem);
    line-height: 1.1;
    font-weight: 800;
    letter-spacing: -1.5px;
    margin-bottom: 1.5rem;
}

.hero-title span {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 50%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 15px rgba(56, 189, 248, 0.15));
}

.hero-subtitle {
    color: var(--text-muted);
    font-size: 1.15rem;
    line-height: 1.7;
    margin-bottom: 2.5rem;
}

.hero-buttons {
    display: flex;
    gap: 1.25rem;
    flex-wrap: wrap;
}

/* Hero Visual Art (Interactive Node Mockup) */
.hero-visual {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-visual-box {
    width: 100%;
    aspect-ratio: 1;
    max-width: 440px;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.4), rgba(9, 14, 26, 0.7));
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    padding: 1.75rem;
    backdrop-filter: blur(8px);
}

.visual-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(56, 189, 248, 0.1);
    margin-bottom: 1.5rem;
}

.visual-dots {
    display: flex;
    gap: 0.35rem;
}

.visual-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
}

.visual-dot:nth-child(1) { background: #ef4444; }
.visual-dot:nth-child(2) { background: #eab308; }
.visual-dot:nth-child(3) { background: #22c55e; }

.visual-title {
    font-family: monospace;
    font-size: 0.8rem;
    color: var(--text-muted);
    letter-spacing: 0.5px;
}

.visual-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    font-family: monospace;
    font-size: 0.85rem;
    color: var(--primary);
    line-height: 1.6;
}

.visual-code-line {
    opacity: 0.85;
}

.visual-code-line.white {
    color: #ffffff;
}

.visual-code-line.comment {
    color: var(--text-dark);
}

.visual-code-line.accent {
    color: var(--accent);
}

.visual-terminal-output {
    background: rgba(3, 7, 18, 0.5);
    border: 1px solid rgba(56, 189, 248, 0.08);
    border-radius: var(--radius-sm);
    padding: 1rem;
    margin-top: 1rem;
    color: var(--text);
    position: relative;
}

.visual-terminal-output::before {
    content: 'SYSTEM LOG';
    position: absolute;
    top: -8px;
    left: 12px;
    font-size: 0.65rem;
    background: var(--bg-deep);
    padding: 0 0.5rem;
    color: var(--primary);
    border: 1px solid rgba(56, 189, 248, 0.1);
    border-radius: 4px;
}

.visual-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: #22c55e;
    font-size: 0.8rem;
    margin-top: 0.5rem;
}

.visual-status-glow {
    width: 6px;
    height: 6px;
    background: #22c55e;
    border-radius: 50%;
    box-shadow: 0 0 8px #22c55e;
}

/* Glass Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 0.95rem 1.85rem;
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    position: relative;
    overflow: hidden;
    border: 1px solid transparent;
}

.btn i {
    font-size: 1rem;
    transition: transform var(--transition);
}

.btn:hover i {
    transform: translateX(3px);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: #030712;
    font-weight: 700;
    box-shadow: 0 4px 20px rgba(56, 189, 248, 0.2);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 30px rgba(56, 189, 248, 0.35), var(--shadow-glow);
}

.btn-secondary {
    background: rgba(15, 23, 42, 0.4);
    color: var(--text);
    border: 1px solid var(--border);
    backdrop-filter: blur(8px);
}

.btn-secondary:hover {
    background: rgba(56, 189, 248, 0.06);
    border-color: var(--primary);
    color: var(--text);
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

/* Section styling */
section {
    padding: 100px 0;
    position: relative;
    z-index: 1;
}

.section-header {
    text-align: center;
    max-width: 650px;
    margin: 0 auto 4rem;
}

.section-badge {
    color: var(--primary);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 0.75rem;
    display: block;
}

.section-title {
    font-size: clamp(2rem, 3.5vw, 2.75rem);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1.25rem;
    letter-spacing: -0.7px;
}

.section-subtitle {
    color: var(--text-muted);
    font-size: 1.05rem;
    line-height: 1.6;
}

/* Stats / Trust Bar Section */
.trust {
    padding: 40px 0;
    border-top: 1px solid rgba(56, 189, 248, 0.08);
    border-bottom: 1px solid rgba(56, 189, 248, 0.08);
    background: rgba(9, 14, 26, 0.4);
}

.trust-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
}

.trust-item {
    display: flex;
    align-items: center;
    gap: 1.1rem;
    padding: 1rem;
}

.trust-icon-box {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    background: rgba(56, 189, 248, 0.08);
    border: 1px solid rgba(56, 189, 248, 0.15);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.1rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.trust-info {
    display: flex;
    flex-direction: column;
}

.trust-label {
    font-family: 'Outfit', sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text);
}

.trust-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Ecosystem Section */
.ecosystem-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 2rem;
}

.ecosystem-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(8px);
    box-shadow: var(--shadow);
}

.ecosystem-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    opacity: 0;
    transition: var(--transition);
}

.ecosystem-card:hover {
    transform: translateY(-5px);
    background: var(--bg-card-hover);
    border-color: var(--border-hover);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), 0 0 24px rgba(56, 189, 248, 0.08);
}

.ecosystem-card:hover::before {
    opacity: 1;
}

.ecosystem-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.ecosystem-card-title {
    font-size: 1.45rem;
    font-weight: 700;
    color: var(--text);
}

.ecosystem-card-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    background: rgba(56, 189, 248, 0.06);
    border: 1px solid rgba(56, 189, 248, 0.15);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    transition: var(--transition);
}

.ecosystem-card:hover .ecosystem-card-icon {
    background: var(--primary);
    color: #030712;
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(56, 189, 248, 0.4);
}

.ecosystem-card-desc {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.55;
    margin-bottom: 1.75rem;
}

.category-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.category-tag {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.35rem 0.75rem;
    border-radius: 99px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: var(--text-muted);
    transition: var(--transition);
}

.ecosystem-card:hover .category-tag {
    border-color: rgba(56, 189, 248, 0.15);
    background: rgba(56, 189, 248, 0.03);
    color: var(--primary);
}

.ecosystem-highlight-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.85rem;
    border-radius: 8px;
    background: rgba(34, 211, 238, 0.05);
    border: 1px solid rgba(34, 211, 238, 0.1);
    color: var(--accent);
    font-size: 0.8rem;
    font-weight: 600;
    font-family: monospace;
    margin-bottom: 1.5rem;
    align-self: flex-start;
}

.ecosystem-card-list {
    list-style: none;
    padding: 0;
    margin-top: auto;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 1.25rem;
}

.ecosystem-card-list li {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    font-size: 0.88rem;
    color: var(--text-muted);
    margin-bottom: 0.6rem;
}

.ecosystem-card-list li:last-child {
    margin-bottom: 0;
}

.ecosystem-card-list li i {
    color: var(--accent);
    font-size: 0.85rem;
}

/* Philosophy Section (The Code) */
.philosophy {
    background: linear-gradient(180deg, transparent, rgba(9, 14, 26, 0.4) 50%, transparent);
}

.philosophy-grid {
    display: grid;
    grid-template-columns: 0.95fr 1.05fr;
    gap: 4.5rem;
    align-items: center;
}

.philosophy-left h2 {
    font-size: clamp(2rem, 3.5vw, 2.75rem);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    letter-spacing: -0.7px;
}

.philosophy-left h2 span {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.philosophy-left p {
    color: var(--text-muted);
    font-size: 1.05rem;
    line-height: 1.65;
    margin-bottom: 2rem;
}

.manifesto-box {
    border-left: 3px solid var(--primary);
    padding-left: 1.5rem;
    margin-top: 2rem;
    font-style: italic;
    color: var(--text);
    font-size: 1rem;
}

.philosophy-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.philosophy-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.75rem;
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
    transition: var(--transition);
    backdrop-filter: blur(8px);
}

.philosophy-item:hover {
    transform: translateX(6px);
    background: var(--bg-card-hover);
    border-color: var(--border-hover);
}

.philosophy-icon-box {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    background: rgba(56, 189, 248, 0.06);
    border: 1px solid rgba(56, 189, 248, 0.15);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.25rem;
    transition: var(--transition);
}

.philosophy-item:hover .philosophy-icon-box {
    background: var(--primary);
    color: #030712;
    box-shadow: 0 0 15px rgba(56, 189, 248, 0.3);
}

.philosophy-info {
    flex: 1;
}

.philosophy-item-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.4rem;
}

.philosophy-item-desc {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Why ChryzX Labs? (Pillars grid) */
.why-chryzx {
    border-top: 1px solid rgba(56, 189, 248, 0.08);
}

.why-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.75rem;
}

.why-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 2rem;
    transition: var(--transition);
    backdrop-filter: blur(8px);
}

.why-card:hover {
    transform: translateY(-4px);
    background: var(--bg-card-hover);
    border-color: var(--border-hover);
    box-shadow: var(--shadow);
}

.why-icon {
    font-size: 1.5rem;
    color: var(--primary);
    margin-bottom: 1.25rem;
    display: inline-block;
}

.why-card-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.6rem;
}

.why-card-desc {
    color: var(--text-muted);
    font-size: 0.88rem;
    line-height: 1.55;
}

/* Focus Section */
.current-focus {
    background: rgba(9, 14, 26, 0.3);
    padding: 80px 0;
}

.focus-tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    max-width: 900px;
    margin: 0 auto;
}

.focus-tag {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.75rem 1.35rem;
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text);
    font-size: 0.95rem;
    font-weight: 600;
    transition: var(--transition);
    cursor: default;
    backdrop-filter: blur(4px);
}

.focus-tag i {
    color: var(--primary);
    font-size: 0.95rem;
}

.focus-tag:hover {
    background: rgba(56, 189, 248, 0.08);
    border-color: var(--primary);
    transform: scale(1.03);
    box-shadow: 0 0 15px rgba(56, 189, 248, 0.15);
}

/* Collaborate (Contact Interactive Terminal) */
.collaborate {
    border-top: 1px solid rgba(56, 189, 248, 0.08);
}

.collaborate-box {
    max-width: 780px;
    margin: 0 auto;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    backdrop-filter: blur(12px);
    box-shadow: var(--shadow);
}

.collaborate-terminal-head {
    background: rgba(3, 7, 18, 0.8);
    border-bottom: 1px solid rgba(56, 189, 248, 0.1);
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.terminal-title {
    font-family: monospace;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.collaborate-body {
    padding: 2.5rem;
}

.collaborate-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group.full-width {
    grid-column: span 2;
}

.form-label {
    font-family: 'Outfit', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 0.5px;
}

.form-control {
    background: rgba(3, 7, 18, 0.6);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.85rem 1rem;
    color: var(--text);
    font-family: inherit;
    font-size: 0.95rem;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(9, 14, 26, 0.8);
    box-shadow: 0 0 15px rgba(56, 189, 248, 0.15);
}

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

.terminal-status-container {
    display: none;
    margin-top: 1.5rem;
    background: rgba(3, 7, 18, 0.85);
    border: 1px solid rgba(34, 211, 238, 0.2);
    border-radius: var(--radius-sm);
    padding: 1.25rem;
    font-family: monospace;
    font-size: 0.85rem;
}

.terminal-log-line {
    margin-bottom: 0.4rem;
    color: var(--accent);
}

.terminal-log-line.success {
    color: #22c55e;
}

.terminal-log-line:last-child {
    margin-bottom: 0;
}

/* Footer styling */
.footer {
    background: #020308;
    padding: 5rem 0 3rem;
    border-top: 1px solid rgba(255, 255, 255, 0.03);
    position: relative;
    z-index: 1;
}

.footer-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 3rem;
    margin-bottom: 3.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 3rem;
}

.footer-brand {
    max-width: 320px;
}

.footer-desc {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-top: 1rem;
}

.footer-links-group {
    display: flex;
    gap: 5rem;
}

.footer-nav-col {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.footer-title {
    font-family: 'Outfit', sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-links-list {
    list-style: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--transition);
}

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

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-dark);
    font-size: 0.85rem;
}

/* Static Content Page (Terms/Privacy) Styling */
.content-page {
    padding: 160px 0 100px;
    z-index: 1;
    position: relative;
}

.page-section {
    max-width: 800px;
    margin: 0 auto;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 3rem;
    backdrop-filter: blur(12px);
    box-shadow: var(--shadow);
}

.page-section h1 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #ffffff, var(--primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.page-section h2 {
    font-size: 1.35rem;
    margin: 2.25rem 0 1rem;
    color: var(--primary);
}

.page-section p {
    color: var(--text-muted);
    margin-bottom: 1.25rem;
    line-height: 1.7;
    font-size: 0.95rem;
}

/* Animation triggers */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.reveal {
    opacity: 0;
    transition: var(--transition);
}

.reveal.active {
    animation: slideUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Responsive Breakpoints */
@media (max-width: 1024px) {
    .hero-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
        text-align: center;
    }

    .hero-content {
        margin: 0 auto;
    }

    .hero-buttons {
        justify-content: center;
    }

    .hero-visual {
        margin-top: 1rem;
    }

    .hero-visual-box {
        margin: 0 auto;
    }

    .philosophy-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

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

    .manifesto-box {
        max-width: 600px;
        margin: 2rem auto 0;
        text-align: left;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none; /* Can implement burger menu later if requested */
    }

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

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

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

    .footer-top {
        flex-direction: column;
        gap: 2.5rem;
    }

    .footer-links-group {
        width: 100%;
        justify-content: space-between;
        gap: 2rem;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}

@media (max-width: 576px) {
    .container {
        width: min(100%, calc(100% - 32px));
    }

    .hero {
        padding-top: 140px;
        padding-bottom: 60px;
    }

    .hero-title {
        font-size: 2.25rem;
    }

    .page-section {
        padding: 2rem 1.5rem;
    }

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

    .collaborate-body {
        padding: 1.5rem;
    }
}

/* ==========================================
   Ecosystem Apps Portal Styling
   ========================================== */
.apps-page {
    padding: 160px 0 100px;
    z-index: 1;
    position: relative;
}

/* Global Tools Search Bar Styling */
.search-header-container {
    position: absolute;
    top: 6px;
    right: 0;
    width: 280px;
    z-index: 10;
}

.search-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.search-icon {
    position: absolute;
    left: 1rem;
    color: var(--text-muted);
    width: 16px;
    height: 16px;
    pointer-events: none;
    transition: var(--transition);
}

#search-input {
    width: 100%;
    padding: 0.75rem 1.1rem 0.75rem 2.8rem;
    background: rgba(15, 23, 42, 0.45);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 0.9rem;
    outline: none;
    transition: var(--transition);
    backdrop-filter: blur(12px);
}

#search-input:focus {
    border-color: var(--primary);
    background: rgba(9, 14, 26, 0.75);
    box-shadow: 0 0 20px rgba(56, 189, 248, 0.18), inset 0 0 8px rgba(56, 189, 248, 0.04);
}

#search-input:focus ~ .search-icon {
    color: var(--primary);
}

#clear-search-btn {
    position: absolute;
    right: 1rem;
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: var(--transition);
}

#clear-search-btn:hover {
    color: var(--primary);
    transform: scale(1.1);
}

@media (max-width: 992px) {
    .search-header-container {
        position: relative;
        top: 0;
        margin: 1.5rem auto 0;
        width: 100%;
        max-width: 380px;
    }
}

/* Interactive Category Tabs Styling */
.category-tabs-container {
    max-width: 1100px;
    margin: 0 auto 3.5rem;
}

.category-tabs {
    display: flex;
    gap: 0.75rem;
    overflow-x: auto;
    padding-bottom: 0.75rem;
    scrollbar-width: none;
    -ms-overflow-style: none;
    justify-content: flex-start;
}

.category-tabs::-webkit-scrollbar {
    display: none;
}

.tab-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1.15rem;
    border-radius: 99px;
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: var(--transition);
}

.tab-btn:hover {
    background: rgba(56, 189, 248, 0.05);
    border-color: rgba(56, 189, 248, 0.3);
    color: var(--text);
    transform: translateY(-1px);
}

.tab-btn.active {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border-color: var(--primary);
    color: #030712;
    box-shadow: 0 4px 15px rgba(56, 189, 248, 0.25);
}

.tab-icon {
    width: 15px;
    height: 15px;
}

.tab-count {
    font-size: 0.72rem;
    padding: 0.1rem 0.45rem;
    border-radius: 99px;
    background: rgba(255, 255, 255, 0.08);
    color: inherit;
    font-weight: 700;
}

.tab-btn.active .tab-count {
    background: rgba(3, 7, 18, 0.15);
}

@media (min-width: 992px) {
    .category-tabs {
        justify-content: center;
        flex-wrap: wrap;
    }
}



.category-group {
    margin-bottom: 4.5rem;
}

.category-header {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid rgba(56, 189, 248, 0.12);
    padding-bottom: 0.75rem;
}

.category-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.65rem;
    font-weight: 700;
    color: var(--text);
}

.category-icon {
    color: var(--primary);
    font-size: 1.5rem;
}

.app-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.app-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.85rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: var(--transition);
    backdrop-filter: blur(8px);
    text-decoration: none;
    color: inherit;
    position: relative;
    overflow: hidden;
}

.app-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at var(--mouse-x, 0) var(--mouse-y, 0), rgba(56, 189, 248, 0.08) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

.app-card:hover::before {
    opacity: 1;
}

.app-card:hover {
    transform: translateY(-4px);
    background: var(--bg-card-hover);
    border-color: var(--border-hover);
    box-shadow: var(--shadow);
}

.app-card-top {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.1rem;
}

.app-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    background: rgba(56, 189, 248, 0.06);
    border: 1px solid rgba(56, 189, 248, 0.15);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: var(--transition);
    flex-shrink: 0;
}

.app-card:hover .app-icon {
    background: var(--primary);
    color: #030712;
    box-shadow: 0 0 12px rgba(56, 189, 248, 0.3);
}

.app-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text);
}

.app-desc {
    color: var(--text-muted);
    font-size: 0.88rem;
    line-height: 1.55;
    margin-bottom: 1.5rem;
}

.app-action {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary);
    font-family: monospace;
    margin-top: auto;
}

.app-action i {
    font-size: 0.95rem;
    transition: transform var(--transition);
}

.app-card:hover .app-action i {
    transform: translateX(3px);
}

.app-actions-list {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    margin-top: auto;
    border-top: 1px solid rgba(56, 189, 248, 0.08);
    padding-top: 1.15rem;
    width: 100%;
}

.app-action-sub {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.6rem 0.85rem;
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.35);
    border: 1px solid rgba(56, 189, 248, 0.06);
    color: var(--primary);
    font-size: 0.8rem;
    font-weight: 600;
    font-family: monospace;
    text-decoration: none;
    transition: var(--transition);
}

.app-action-sub:hover {
    background: rgba(56, 189, 248, 0.09);
    border-color: rgba(56, 189, 248, 0.3);
    color: var(--text);
    padding-left: 1.1rem;
}

.app-action-sub i {
    width: 14px;
    height: 14px;
    transition: transform var(--transition);
}

.app-action-sub:hover i {
    transform: translateX(3px);
}


/* ==========================================
   Global Mobile & Tablet Responsiveness Overrides
   ========================================== */

/* Tablet & Mobile Layout Adaptations */
@media (max-width: 992px) {
    .tool-container {
        padding: 100px 0 40px !important;
    }

    .tool-grid {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
    }

    /* Keep panels layout compact */
    .calc-panel, .control-panel, .editor-panel, .results-panel, .page-section {
        padding: 1.5rem !important;
        border-radius: var(--radius-sm) !important;
    }
}

/* Compact Responsive Navbar for all mobile devices */
@media (max-width: 768px) {
    .nav-links {
        display: flex !important;
        gap: 0.75rem !important;
    }
    
    /* Selectively hide less crucial links on mobile to save layout space */
    .nav-links .nav-link {
        font-size: 0.8rem !important;
        padding: 0.2rem 0 !important;
    }
    
    .nav-links a:nth-child(3),
    .nav-links a:nth-child(4) {
        display: none !important; /* Hide secondary links on mobile */
    }
    
    .nav-links .nav-btn {
        padding: 0.4rem 0.85rem !important;
        font-size: 0.75rem !important;
    }
}

/* Mobile Tighter & More Compact UI Styles */
@media (max-width: 576px) {
    .tool-container {
        padding: 90px 0 30px !important;
    }

    /* Titles and typography scaling */
    .panel-title {
        font-size: 1.15rem !important;
        margin-bottom: 1.25rem !important;
    }

    .hero-title {
        font-size: 2.15rem !important;
        letter-spacing: -1px !important;
    }

    .section-title {
        font-size: 1.85rem !important;
    }

    /* Shrink padding and spacings */
    .calc-panel, .control-panel, .editor-panel, .results-panel, .page-section {
        padding: 1.25rem 1rem !important;
    }

    /* Squeeze forms spacing */
    .form-element, .form-group {
        margin-bottom: 1rem !important;
    }

    .form-control, .btn {
        padding: 0.65rem 1rem !important;
        font-size: 0.85rem !important;
    }

    /* Make stats grids adjust on tiny screens */
    .stats-grid {
        grid-template-columns: 1fr !important;
        gap: 0.75rem !important;
    }

    .stat-card {
        padding: 0.85rem !important;
    }

    .stat-val {
        font-size: 1.15rem !important;
    }

    /* Compress main Landing page blocks */
    .app-grid, .ecosystem-grid, .trust-grid, .collaborate-grid {
        grid-template-columns: 1fr !important;
        gap: 1.25rem !important;
    }

    section {
        padding: 3.5rem 0 !important;
    }

    .hero {
        padding-top: 120px !important;
        padding-bottom: 40px !important;
        min-height: auto !important;
    }

    /* Tighter mobile buttons */
    .hero-buttons {
        flex-direction: column;
        gap: 0.75rem;
    }

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

    /* Hide heavy animations or decorative items on mobile for performance & clarity */
    #hero-canvas {
        opacity: 0.35 !important;
    }
    
    .bg-glow-1, .bg-glow-2, .bg-glow-3 {
        filter: blur(80px) !important;
        opacity: 0.05 !important;
    }

    /* Compact header navbar on mobile */
    .navbar {
        padding: 0.85rem 0 !important;
    }

    .logo-text {
        font-size: 1.1rem !important;
    }

    .logo-img {
        width: 28px !important;
        height: 28px !important;
    }
}

/* ==========================================
   SEO Info / Explanation Panel Styling
   ========================================== */
.tool-info-section {
    margin-top: 4rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 3rem;
    backdrop-filter: blur(12px);
    box-shadow: var(--shadow);
}

.tool-info-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #ffffff, var(--primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.tool-info-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
}

.tool-info-left h3, .tool-info-right h3 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary);
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.tool-info-left h3:first-child, .tool-info-right h3:first-child {
    margin-top: 0;
}

.tool-info-left p, .tool-info-right p {
    color: var(--text-muted);
    font-size: 0.92rem;
    line-height: 1.65;
    margin-bottom: 1.25rem;
}

.tool-info-left ul {
    list-style: none;
    padding: 0;
    margin-bottom: 1.5rem;
}

.tool-info-left li {
    font-size: 0.92rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.tool-info-left li i {
    color: var(--accent);
    margin-top: 0.2rem;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.privacy-badge-box {
    background: rgba(34, 211, 238, 0.05);
    border: 1px solid rgba(34, 211, 238, 0.15);
    border-radius: var(--radius-sm);
    padding: 1.5rem;
    margin-top: 1rem;
}

.privacy-badge-box h4 {
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    color: var(--accent);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.privacy-badge-box p {
    margin-bottom: 0;
    font-size: 0.85rem;
}

/* Tablet & Mobile responsive overrides for explanation panel */
@media (max-width: 992px) {
    .tool-info-section {
        padding: 2rem !important;
        margin-top: 3rem !important;
    }
    
    .tool-info-grid {
        grid-template-columns: 1fr !important;
        gap: 2rem !important;
    }
}
@media (max-width: 576px) {
    .tool-info-section {
        padding: 1.5rem 1rem !important;
    }
    .tool-info-title {
        font-size: 1.4rem !important;
    }
}
