/* Impact OS Website Styles */
/* Inspired by Shape Up with VOLTA brand colors */

:root {
    /* VOLTA Brand Colors */
    --purple: #6100FF;
    --cyan: #01D9E7;
    --coral: #FF6D6D;
    --yellow: #FFBB0E;

    /* Base Colors */
    --bg-primary: #000000;
    --bg-secondary: #1a1a1a;
    --text-primary: #ffffff;
    --text-secondary: #e0e0e0;
    --text-muted: #999999;

    /* Spacing */
    --spacing-xs: 8px;
    --spacing-sm: 16px;
    --spacing-md: 24px;
    --spacing-lg: 32px;
    --spacing-xl: 48px;
    --spacing-xxl: 64px;

    /* Typography */
    --font-family: 'Lato', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    --font-size-base: 1.1rem;
    --font-size-sm: 0.95rem;
    --font-size-lg: 1.25rem;
    --line-height: 1.7;
}

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

body {
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    font-weight: 400;
    line-height: var(--line-height);
    color: var(--text-primary);
    background-color: var(--bg-primary);
    background-image: url('../public/login-background.png');
    background-size: auto 1800px;
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.92);
    z-index: -1;
    pointer-events: none;
}

/* Gradient Bar */
.gradient-bar {
    height: 6px;
    background: linear-gradient(90deg, var(--purple) 0%, var(--cyan) 33%, var(--coral) 66%, var(--yellow) 100%);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(97, 0, 255, 0.2);
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--spacing-xl) var(--spacing-md);
    padding-top: calc(var(--spacing-xl) + 4px); /* Account for gradient bar */
}

.content-wrapper {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: calc(var(--spacing-xxl) - 30px);
    align-items: start;
    margin-top: var(--spacing-xl);
}

.what-is-box {
    grid-column: 2;
    grid-row: 1;
}

.table-of-contents {
    grid-column: 1;
    grid-row: 1 / 3;
}

main {
    grid-column: 2;
    grid-row: 2;
    max-width: 720px;
    padding-right: 30px;
}

@media (max-width: 968px) {
    .content-wrapper {
        grid-template-columns: 1fr;
        display: flex;
        flex-direction: column;
    }

    main {
        max-width: 100%;
    }

    .what-is-box {
        order: -2;
        grid-column: 1;
    }

    .table-of-contents {
        order: -1;
        grid-column: 1;
    }
}

@media (max-width: 768px) {
    .container {
        padding: var(--spacing-lg) var(--spacing-sm);
    }
}

/* Typography */
h1 {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: var(--spacing-sm);
    color: var(--text-primary);
}

h2 {
    font-size: 1.75rem;
    font-weight: 600;
    line-height: 1.3;
    margin-top: var(--spacing-xxl);
    margin-bottom: var(--spacing-lg);
    color: var(--text-primary);
}

h3 {
    font-size: 1.35rem;
    font-weight: 600;
    line-height: 1.4;
    margin-top: var(--spacing-xl);
    margin-bottom: var(--spacing-md);
    color: var(--text-primary);
}

h4 {
    font-size: 1.15rem;
    font-weight: 600;
    line-height: 1.4;
    margin-top: var(--spacing-lg);
    margin-bottom: var(--spacing-md);
    color: var(--text-primary);
}

/* Add color rotation to section headers */
section:nth-of-type(1) h2 {
    color: var(--yellow);
    border-bottom: 2px solid var(--yellow);
    padding-bottom: var(--spacing-sm);
    margin-bottom: var(--spacing-lg);
    margin-top: 0;
}
section:nth-of-type(2) h2 { color: var(--purple); }
section:nth-of-type(3) h2 { color: var(--coral); }
section:nth-of-type(4) h2 { color: var(--yellow); }
section:nth-of-type(5) h2 { color: var(--cyan); }
section:nth-of-type(6) h2 { color: var(--purple); }

p {
    margin-bottom: var(--spacing-md);
    color: var(--text-secondary);
}

.subtitle {
    font-size: var(--font-size-lg);
    font-weight: 300;
    color: var(--text-muted);
    margin-bottom: var(--spacing-xl);
}

/* Links */
a {
    color: var(--yellow);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--purple);
    text-decoration: underline;
}

/* Lists */
ul, ol {
    margin-bottom: var(--spacing-md);
    padding-left: var(--spacing-lg);
}

ul li, ol li {
    margin-bottom: var(--spacing-sm);
    color: var(--text-secondary);
}

ul li::marker {
    color: var(--yellow);
}

ol li::marker {
    color: var(--yellow);
    font-weight: 600;
}

/* Nested Lists */
ul ul, ol ul, ul ol, ol ol {
    margin-top: var(--spacing-sm);
    margin-bottom: var(--spacing-sm);
}

/* Strong Text */
strong {
    font-weight: 600;
    color: var(--text-primary);
}

/* Table of Contents */
.table-of-contents {
    position: sticky;
    top: 20px;
    align-self: start;
    padding-left: 10px;
}

.table-of-contents h2 {
    font-size: 1rem;
    font-weight: 600;
    margin-top: 0;
    margin-bottom: var(--spacing-md);
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.table-of-contents > ol {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.table-of-contents > ol > li {
    margin-bottom: var(--spacing-md);
}

.table-of-contents > ol > li > a {
    font-weight: 600;
    font-size: 0.95rem;
    line-height: 1.4;
    display: block;
    margin-bottom: var(--spacing-xs);
}

.table-of-contents ul {
    list-style-type: none;
    padding-left: 0;
    margin-top: var(--spacing-xs);
    display: none; /* Collapsed by default, like Shape Up */
}

.table-of-contents li {
    margin-bottom: 0;
}

.table-of-contents a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.table-of-contents a:hover {
    color: var(--yellow);
    text-decoration: none;
    padding-left: 4px;
    transition: all 0.2s ease;
}

.table-of-contents a {
    transition: all 0.2s ease;
}

@media (max-width: 968px) {
    .table-of-contents {
        position: static;
        background-color: var(--bg-secondary);
        padding: var(--spacing-md);
        border-radius: 8px;
        margin-bottom: var(--spacing-lg);
        border-left: 4px solid var(--yellow);
        width: 100%;
        margin-left: 0;
        margin-right: 0;
    }

    .table-of-contents h2 {
        font-size: 0.9rem;
        color: var(--yellow);
        text-transform: uppercase;
        margin-bottom: var(--spacing-sm);
    }

    .table-of-contents > ol > li {
        margin-bottom: var(--spacing-xs);
    }

    .table-of-contents > ol > li > a {
        font-size: 0.85rem;
    }
}

/* Section Divider */
.section-divider {
    text-align: center;
    font-size: 1.5rem;
    letter-spacing: 1rem;
    color: var(--text-muted);
    margin: var(--spacing-xxl) 0;
    opacity: 0.5;
}

/* CTA Box */
/* What Is Box */
.what-is-box {
    background: linear-gradient(135deg, rgba(97, 0, 255, 0.1), rgba(1, 217, 231, 0.05));
    padding: var(--spacing-lg);
    border-radius: 12px;
    margin: var(--spacing-lg) 0 var(--spacing-xl) 0;
    border: 2px solid var(--purple);
    box-shadow: 0 4px 20px rgba(97, 0, 255, 0.15);
}

.what-is-box h3 {
    margin-top: 0;
    margin-bottom: var(--spacing-sm);
    color: var(--text-primary);
    font-size: 1.3rem;
}

.what-is-box p {
    margin-bottom: 0;
    font-size: var(--font-size-lg);
    line-height: 1.6;
    color: var(--text-primary);
}

.cta-box {
    background-color: var(--bg-secondary);
    padding: var(--spacing-lg);
    border-radius: 8px;
    margin: var(--spacing-xl) 0;
    border-left: 4px solid var(--yellow);
    text-align: center;
}

.cta-box p {
    margin-bottom: var(--spacing-md);
    font-size: var(--font-size-lg);
}

.cta-button {
    display: inline-block;
    background: linear-gradient(135deg, var(--yellow), var(--purple));
    color: var(--text-primary);
    padding: var(--spacing-sm) var(--spacing-lg);
    border-radius: 8px;
    font-weight: 600;
    font-size: var(--font-size-base);
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    box-shadow: 0 4px 16px rgba(255, 187, 14, 0.2);
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 24px rgba(255, 187, 14, 0.4);
    text-decoration: none;
    color: var(--text-primary);
}

.signature {
    font-size: var(--font-size-sm);
    color: var(--text-muted);
    margin-top: var(--spacing-md);
    margin-bottom: 0;
}

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

.signature a:hover {
    color: var(--yellow);
}

/* Contact Section */
.contact-section {
    margin-top: 0;
    padding-top: 0;
}

.contact-section h2 {
    margin-top: var(--spacing-lg);
}

.collaboration-signature {
    margin-top: var(--spacing-lg);
    font-size: var(--font-size-base);
    color: var(--text-secondary);
}

.collaboration-signature a {
    color: var(--yellow);
    text-decoration: none;
    font-weight: 600;
}

.collaboration-signature a:hover {
    text-decoration: underline;
}

/* Header */
header {
    margin-bottom: 0;
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: calc(var(--spacing-xxl) - 30px);
    align-items: start;
}

.logo-container {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

.logo-link {
    display: inline-flex;
}

.logo {
    height: 75px;
    width: auto;
    display: block;
    transition: opacity 0.3s ease;
}

.logo:hover {
    opacity: 0.8;
}

.logo-tagline {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin: 0;
    padding-left: 10px;
}

.title-container {
    max-width: 720px;
    padding-right: 30px;
}

header h1 {
    margin: 0 0 var(--spacing-sm) 0;
    text-align: left;
    line-height: 1.1;
    color: var(--text-primary);
}

header .subtitle {
    text-align: left;
    margin: 0;
    font-size: 1.15rem;
    line-height: 1.5;
    opacity: 0.9;
    font-weight: 700;
}

@media (max-width: 968px) {
    header {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .logo-container {
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: var(--spacing-md);
        margin-bottom: var(--spacing-sm);
    }

    .logo-container::after {
        content: "impact OS";
        font-size: 1.75rem;
        font-weight: 700;
        color: var(--text-primary);
        line-height: 1;
    }

    header h1 {
        display: none;
    }

    .title-container {
        max-width: 100%;
        padding-right: 0;
    }

    header .subtitle {
        font-size: 0.9rem;
        line-height: 1.4;
        margin: 0;
    }

    /* Mobile TOC Jump Button */
    .mobile-toc-jump {
        display: flex;
        position: fixed;
        right: 16px;
        top: 50%;
        transform: translateY(-50%);
        width: 44px;
        height: 44px;
        background-color: rgba(255, 187, 14, 0.15);
        border: 1px solid rgba(255, 187, 14, 0.3);
        border-radius: 8px;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        z-index: 999;
        transition: all 0.3s ease;
        backdrop-filter: blur(10px);
    }

    .mobile-toc-jump:hover {
        background-color: rgba(255, 187, 14, 0.25);
        border-color: rgba(255, 187, 14, 0.5);
        transform: translateY(-50%) scale(1.05);
    }

    .mobile-toc-jump::before {
        content: "↑";
        font-size: 24px;
        color: var(--yellow);
        line-height: 1;
    }
}

@media (min-width: 969px) {
    .mobile-toc-jump {
        display: none;
    }
}

@media (max-width: 768px) {
    .logo {
        height: 50px;
    }
}

/* Footer */
footer {
    margin-top: var(--spacing-xxl);
    padding: var(--spacing-xl) 0 var(--spacing-lg);
    text-align: center;
    border-top: 1px solid var(--bg-secondary);
}

footer p {
    font-size: var(--font-size-sm);
    color: var(--text-muted);
    margin-bottom: 0;
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 20px;
}

/* Selection */
::selection {
    background-color: var(--yellow);
    color: var(--bg-primary);
}

::-moz-selection {
    background-color: var(--yellow);
    color: var(--bg-primary);
}

/* Focus Styles */
a:focus,
button:focus {
    outline: 2px solid var(--yellow);
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .gradient-bar,
    .table-of-contents,
    .cta-box,
    footer {
        display: none;
    }

    body {
        color: #000;
        background: #fff;
    }

    a {
        color: #000;
        text-decoration: underline;
    }
}

/* Mobile Responsive Adjustments */
@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    h3 {
        font-size: 1.25rem;
    }

    h4 {
        font-size: 1.1rem;
    }

    body {
        font-size: 1rem;
    }

    .table-of-contents {
        padding: var(--spacing-md);
    }

    .cta-box {
        padding: var(--spacing-md);
    }
}

/* Accessibility: Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
