/* 
   INVARIANS - Foundation Grade Theme 
   Reference: Institutional, Polkadot-inspired, Neutral.
*/

:root {
    --bg-color: #050505;
    --bg-secondary: #0a0a0a;
    --text-primary: #f0f0f0;
    --text-secondary: #a0a0a0;
    --text-tertiary: #606060;
    --border-subtle: rgba(255, 255, 255, 0.1);

    /* Typography */
    /* Serif for Headings (Institutional feel) - Using native system serifs or accessible web fonts */
    --font-serif: 'Georgia', 'Cambria', 'Times New Roman', Times, serif;
    /* Sans for Body (Neutral readability) */
    --font-sans: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

    --max-width: 1400px;
    --header-height: 80px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 18px;
    /* High readability */
    line-height: 1.7;
    /* Generous spacing */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Layout Grid */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 40px;
    width: 100%;
}

/* Typography Foundation */
h1,
h2,
h3,
h4 {
    font-family: var(--font-serif);
    font-weight: 400;
    /* Regular weight for elegance */
    color: var(--text-primary);
    line-height: 1.2;
    margin-bottom: 1.5em;
}

h1 {
    font-size: 4rem;
    letter-spacing: -0.02em;
}

h2 {
    font-size: 2.5rem;
    margin-top: 3em;
    padding-top: 2em;
    border-top: 1px solid var(--border-subtle);
}

h3 {
    font-size: 1.75rem;
    color: var(--text-primary);
    margin-bottom: 1em;
}

p {
    font-size: 1.125rem;
    /* 18px */
    color: var(--text-secondary);
    margin-bottom: 24px;
    max-width: 70ch;
    /* Optimal line length */
}

/* Utility Classes for Text */
.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.lead {
    font-size: 1.5rem;
    line-height: 1.5;
    color: var(--text-secondary);
    font-family: var(--font-serif);
    max-width: 40ch;
}

.mono {
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Fira Mono', monospace;
    font-size: 0.9em;
    color: var(--text-tertiary);
}

/* Header (Sticky, Minimal) */
header {
    height: var(--header-height);
    background: rgba(5, 5, 5, 0.95);
    backdrop-filter: blur(8px);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo img {
    height: 32px;
    width: auto;
    display: block;
}

.nav-links {
    display: flex;
    gap: 40px;
}

.nav-links a {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-tertiary);
    text-decoration: none;
    transition: color 0.2s ease;
    font-weight: 500;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--text-primary);
}

/* Footer (Institutional) */
footer {
    margin-top: 120px;
    padding: 80px 0;
    border-top: 1px solid var(--border-subtle);
    background-color: var(--bg-secondary);
}

.footer-content {
    display: flex;
    justify-content: center;
    align-items: center;
}

.footer-links a {
    color: var(--text-tertiary);
    margin: 0 15px;
    font-size: 0.9rem;
    text-decoration: none;
}

.footer-links a:hover {
    color: var(--text-primary);
}

/* Sections & Spacing */
.section {
    padding: 100px 0;
    opacity: 0;
    animation: fadeIn 1s ease-out forwards;
}

.section-hero {
    min-height: 60vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
    padding-top: 0;
}

.section-hero h1 {
    margin-bottom: 0.5em;
}

/* Grid Layout for Content (Polkadot style split) */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 2fr;
    /* Changed to 1fr 2fr for better proportion */
    gap: 6rem;
    align-items: start;
    padding-left: 12vw;
    /* Increased left margin for the grid container */
}

@media (max-width: 900px) {
    .grid-2 {
        grid-template-columns: 1fr;
        padding-left: 0;
        /* Remove massive left padding on mobile */
        gap: 3rem;
    }

    h1 {
        font-size: 2.5rem;
    }

    h2 {
        font-size: 1.75rem;
        margin-top: 2em;
    }

    .container {
        padding: 0 24px;
        /* Reduce side padding */
    }

    /* Mobile Header */
    header {
        height: auto;
        padding: 16px 0;
        position: relative;
        /* Un-sticky on complex mobile layouts if needed, or keep sticky but compact */
    }

    nav {
        flex-direction: column;
        gap: 16px;
    }

    .nav-links {
        gap: 20px;
        justify-content: center;
        flex-wrap: wrap;
    }
}

/* Clean Lists (No bullets, nice spacing) */
ul.clean-list {
    list-style: none;
    border-left: 1px solid var(--border-subtle);
    padding-left: 30px;
}

ul.clean-list li {
    font-size: 1.125rem;
    margin-bottom: 12px;
    color: var(--text-primary);
}

/* Form Elements (Institutional, flat) */
form {
    max-width: 480px;
}

input {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--text-tertiary);
    color: var(--text-primary);
    padding: 16px 0;
    font-size: 1.1rem;
    font-family: var(--font-sans);
    margin-bottom: 32px;
    border-radius: 0;
    transition: border-color 0.2s;
}

input:focus {
    outline: none;
    border-bottom-color: var(--text-primary);
}

.instrument-btn {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--text-primary);
    padding: 16px 48px;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-block;
    text-decoration: none;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.instrument-btn:hover {
    border-color: rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.4);
    transform: translateY(-1px);
}

.disclaimer-box {
    margin-top: 40px;
    padding: 24px;
    border: 1px solid var(--border-subtle);
    color: var(--text-tertiary);
    font-size: 0.85rem;
    background: rgba(255, 255, 255, 0.02);
}

/* Animation */
@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

.text-gradient-fade {
    background: linear-gradient(to right, #ffffff 30%, rgba(255, 255, 255, 0.25) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
    display: inline-block;
}

@keyframes fadeSlideRight {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.fade-in-right {
    opacity: 0;
    animation: fadeSlideRight 0.8s ease-out forwards;
}

.delay-1 {
    animation-delay: 0.1s;
}

.delay-2 {
    animation-delay: 0.2s;
}

.delay-3 {
    animation-delay: 0.3s;
}

/* Social Icons */
.social {
    display: flex;
    gap: 24px;
    align-items: center;
    justify-content: center;
}

.social a {
    color: var(--text-tertiary);
    transition: color 0.2s ease, transform 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.social a:hover {
    color: var(--text-primary);
    transform: translateY(-2px);
}

.icon {
    width: 24px;
    /* Slightly larger for main site */
    height: 24px;
}