/* TCSlib Website - Base Styles */

:root {
    --color-primary: #1c6d8b;
    --color-accent: #c97a00;
    --color-bg: #f9fbfd;
    --color-text: #2a2a2a;
    --color-text-muted: #64748b;
    --color-code-bg: #f4f4f8;
    --color-white: #ffffff;
    --color-border: #e4ebf3;
    --font-sans: "Open Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --font-mono: "Fira Code", "JetBrains Mono", monospace;
    --max-width: 1100px;
    --hover-bg-color: rgba(0, 0, 0, 0.07);
    --filter-primary: invert(37%) sepia(60%) saturate(400%) hue-rotate(163deg) brightness(90%)
        contrast(90%);
    --filter-white: brightness(0) invert(1);
}

[data-theme="dark"] {
    --color-primary: #4da6c8;
    --color-accent: #f0a030;
    --color-bg: #1a1a2e;
    --color-text: #e8e8f0;
    --color-text-muted: #94a3b8;
    --color-code-bg: #252540;
    --color-white: #1e1e32;
    --color-border: #2e2e50;
    --hover-bg-color: rgba(255, 255, 255, 0.07);
    --filter-primary: invert(70%) sepia(40%) saturate(400%) hue-rotate(163deg) brightness(110%) contrast(90%);
    --filter-white: brightness(0) invert(0.9);
}

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

body {
    font-family: var(--font-sans);
    color: var(--color-text);
    background-color: var(--color-bg);
    line-height: 1.6;
    transition: background-color 0.2s, color 0.2s;
}

/* Navigation */
.navbar {
    background: var(--color-white);
    border-bottom: 2px solid var(--color-border);
    padding: 1.5rem 10vw;
}

.nav-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    gap: 3rem;
    align-items: center;
}

.logo {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-primary);
    text-decoration: none;
}

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

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

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

.nav-links .divider {
    color: #999;
}

.nav-links img {
    vertical-align: middle;
}

.nav-icons {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.nav-icons a {
    display: flex;
    align-items: center;
}

.nav-icons img {
    filter: brightness(0);
    display: block;
}

[data-theme="dark"] .nav-icons img {
    filter: var(--filter-white);
}

.theme-toggle {
    all: unset;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
}

/* Main content */
main {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

/* Footer */
footer {
    background: var(--color-primary);
    color: rgba(255, 255, 255, 0.7);
    padding: 2rem 10vw;
    font-size: 0.9rem;
}

.footer-inner {
    max-width: var(--max-width);
    margin: 0 auto;
}

footer a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.2s;
}

footer a:hover {
    color: var(--color-white);
}

.footer-copy {
    text-align: center;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
}

/* Hide default page title (we have the nav logo) */
article > h1:first-child {
    display: none;
}

/* Hero Section */
.hero {
    padding: 4rem 0 3rem;
}

.hero-text {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 3rem;
}

.hero-text > p:first-child {
    font-size: 4rem;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.03em;
    margin-bottom: 0.5rem;
    color: var(--color-primary);
}

.hero-text > p:nth-child(2) {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.01em;
    margin-bottom: 0;
}

.hero-text > p:nth-child(3) {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.01em;
    margin-bottom: 1rem;
}

.hero-text > p:nth-child(4) {
    font-size: 1.125rem;
    color: var(--color-text-muted);
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.hero-text > p:last-child {
    display: flex;
    gap: 2rem;
    justify-content: center;
    margin-top: 2rem;
}

.hero-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2.5rem;
    border-radius: 0.5rem;
    font-size: 17px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s;
}

.hero-btn img {
    width: 20px;
    height: 20px;
}

.hero-btn {
    vertical-align: middle;
}

.hero-btn + .hero-btn {
    margin-left: 1rem;
}

.hero-btn.primary {
    background: var(--color-primary);
    color: var(--color-white);
}

.hero-btn.primary img {
    filter: var(--filter-white);
}

.hero-btn.primary:hover {
    background: color-mix(in srgb, var(--color-primary) 80%, white);
}

.hero-btn.secondary {
    border: 2px solid var(--color-primary);
    background: var(--color-white);
    color: var(--color-primary);
}

.hero-btn.secondary:hover {
    background: var(--color-primary);
    color: var(--color-white);
}

/* Section titles */
.pillars > p:first-child {
    grid-column: 1 / -1;
}

.pillars > p:first-child > strong {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--color-text);
    display: block;
    text-align: center;
    margin-bottom: 1rem;
}

/* Pillars */
.pillars {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    padding: 5rem 0;
}

.pillar {
    display: flex;
    flex-direction: column;
}

.pillar > p:first-child {
    margin-bottom: 0.75rem;
}

.pillar > p:first-child > strong {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-primary);
}

.pillar > p:nth-child(2) {
    color: var(--color-text-muted);
    line-height: 1.7;
}

/* Get Started (CTA section) */
.get-started {
    background: var(--color-primary);
    color: var(--color-white);
    padding: 4rem 3rem;
    text-align: center;
    border-radius: 1rem;
    margin-bottom: 2rem;
}

.get-started > p:first-child > strong {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--color-white);
}

.get-started > p:nth-child(2) {
    color: rgba(255, 255, 255, 0.85);
    max-width: 650px;
    margin: 0.5rem auto 0;
    line-height: 1.7;
    font-size: 1.05rem;
}

.get-started a {
    color: rgba(255, 255, 255, 0.9);
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.85rem 2rem;
    border-radius: 0.5rem;
    font-size: 16px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s;
}

.cta-btn img {
    width: 18px;
    height: 18px;
}

.cta-btn.primary {
    background: var(--color-white);
    color: var(--color-primary);
}

.cta-btn.primary img {
    filter: var(--filter-primary);
}

.cta-btn.primary:hover {
    background: rgba(255, 255, 255, 0.9);
}

.cta-btn.secondary {
    border: 2px solid var(--color-white);
    background: transparent;
    color: var(--color-white);
}

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

/* Responsive */
@media (max-width: 768px) {
    .navbar {
        padding: 1rem 1.5rem;
    }

    .nav-links {
        display: none;
    }

    .hero-text > p:first-child {
        font-size: 2rem;
    }

    .hero-text > p:last-child {
        flex-direction: column;
        align-items: center;
    }

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

    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }

    .get-started {
        padding: 3rem 1.5rem;
    }
}
