:root {
    /* Trackule Color Palette (Light Theme Default) */
    --background: #F5F3EF;
    --surface: #FFFFFF;
    --border: #E5E2DC;
    --text-primary: #1E2328;
    --text-secondary: #4B5563;
    --text-muted: #9CA3AF;
    --success: #2D8B4E;
    --success-hover: #238c4a;
    --danger: #B83B3B;

    /* Dark Theme Token for Header/Footer */
    --dark-bg: #1E2328;
    --dark-text: #E8E4DC;
    --dark-text-muted: #6B7280;
}

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

body {
    font-family: 'Karla', sans-serif;
    background-color: var(--background);
    color: var(--text-primary);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

h1,
h2,
h3 {
    font-family: 'Karla', sans-serif;
    color: var(--text-primary);
}

h1 {
    font-family: 'Cormorant', serif;
    font-weight: 600;
}

a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s;
}

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

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    width: 100%;
}

/* Header */
header {
    padding: 16px 0;
    background-color: var(--dark-bg);
    color: var(--dark-text);
}

header h1 {
    color: var(--dark-text);
}

.logo {
    width: 55px;
    height: 55px;
    margin-bottom: 16px;
    border-radius: 14px;
}

.branding {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding-left: 24px;
    /* Optional: extra padding as requested */
}

.branding .logo {
    margin-bottom: 0;
    margin-right: 24px;
}

.branding h1 {
    font-size: 1.9em;
    margin-bottom: 0;
    line-height: 1;
}

/* Response for mobile: Stack them or keep row but smaller? */
@media (max-width: 600px) {
    .branding {
        flex-direction: column;
        align-items: flex-start;
        padding-left: 20px;
    }

    .branding h1 {
        font-size: 3em;
    }
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 16px;
    border: 1px solid transparent;
}

.btn-primary {
    background-color: var(--success);
    color: #fff !important;
}

.btn-primary:hover {
    background-color: var(--success-hover);
    transform: translateY(-1px);
}

.btn-secondary {
    background-color: transparent;
    border: 1px solid #1E2328;
    color: #1E2328 !important;
}

.btn-secondary:hover:not([disabled]) {
    background-color: var(--surface);
    transform: translateY(-1px);
}

.btn-secondary[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Content Sections */
.content-section {
    padding: 40px 0;
}

.card {
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 16px;
}

/* Intro / Main Section */
.intro-section {
    padding: 60px 0 20px;
    /* Reduced bottom padding */
}

.intro-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    /* Content takes more space, buttons less */
    gap: 60px;
    align-items: flex-start;
}

.intro-actions {
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: stretch;
}

.intro-actions .btn {
    width: 100%;
    text-align: center;
    justify-content: center;
}

/* Removed hero overlay styles */


.what-is-section {
    padding: 80px 0;
}

.grid-2-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
}

.what-is-left h2 {
    font-size: 2.5rem;
    font-family: 'Cormorant', serif;
}

.what-is-right p {
    font-size: 1.15rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* Screenshots Section */
.screenshots-section {
    padding: 20px 0 100px;
}

.light-bg h2,
.light-bg p,
.light-bg li {
    color: var(--text-primary);
}

.grid-3-col {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

.screenshot-card {
    position: relative;
    cursor: pointer;
    perspective: 1000px;
    display: flex;
    flex-direction: column-reverse;
    /* Text (caption) moves to top */
    gap: 24px;
}

.screenshot-card:hover .screenshot-frame {
    transform: translateY(-12px);
    /* Increased lift */
    box-shadow: 0 40px 80px -20px rgba(0, 0, 0, 0.2);
    /* Stronger shadow */
}

.screenshot-frame {
    background-color: transparent;
    border: #121212 solid 8px;
    /* Hardcoded dark border for phone frame */
    border-width: 32px 10px;
    border-radius: 26px;
    box-sizing: border-box;
    overflow: hidden;
    aspect-ratio: 9 / 19.5;
    position: relative;
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.15);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    z-index: 2;
    margin-bottom: 0px;
    /* Gap moved to flex gap */
    /* Reduce size */
    max-width: 80%;
    margin-left: auto;
    margin-right: auto;
}

.screenshot-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Caption Styling */
.screenshot-caption {
    text-align: center;
    padding-top: 0;
    padding-bottom: 0;
}

.screenshot-caption p {
    font-family: 'Karla', sans-serif;
    font-size: 1.25rem;
    font-weight: 600;
    color: #1E2328;
    /* Dark Text */
}

@media (hover: hover) {
    .screenshot-card:hover .screenshot-frame {
        box-shadow: 0 30px 60px -15px rgba(0, 0, 0, 0.25);
    }
}


/* Footer */
footer {
    margin-top: auto;
    padding: 80px 0;
    /* Taller footer */
    background-color: var(--dark-bg);
    border-top: 1px solid #363D45;
    /* Dark border */
    text-align: center;
    font-size: 14px;
    color: var(--dark-text-muted);
}

footer a {
    margin: 0 8px;
}

/* Utility */
.text-center {
    text-align: center;
}

.text-secondary {
    color: var(--text-secondary);
}

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

.mb-2 {
    margin-bottom: 0.5rem;
}

.mb-3 {
    margin-bottom: 1rem;
}

.mb-4 {
    margin-bottom: 1.5rem;
}

.mb-5 {
    margin-bottom: 3rem;
}

.mt-4 {
    margin-top: 1.5rem;
}

/* Responsive */
@media (max-width: 900px) {
    .container {
        padding: 0 20px;
    }

    .hero-container {
        height: 400px;
        align-items: center;
        justify-content: center;
    }

    .hero-overlay-buttons {
        bottom: 24px;
        right: 24px;
        left: 24px;
        justify-content: center;
    }

    .grid-2-col,
    .grid-3-col,
    .intro-grid {
        grid-template-columns: 1fr;
        gap: 60px;
    }

    .what-is-left h2 {
        text-align: center;
        margin-bottom: 24px;
    }

    .what-is-right {
        text-align: left;
    }

    .screenshot-frame {
        max-width: 320px;
        margin: 0 auto;
    }

    .screenshot-card {
        display: flex;
        flex-direction: column-reverse;
        /* Keep text on top on mobile too */
        align-items: center;
        margin-bottom: 40px;
    }
}

/* Markdown Content Styling */
.markdown-content {
    padding: 40px 60px;
    /* More generous padding */
}

/* Mobile padding adjustment */
@media (max-width: 768px) {
    .markdown-content {
        padding: 24px;
    }
}

.markdown-content h1,
.markdown-content h2,
.markdown-content h3,
.markdown-content h4 {
    margin-top: 1.5em;
    margin-bottom: 0.75em;
    line-height: 1.3;
}

.markdown-content h1 {
    font-size: 2.5rem;
    margin-top: 0.5em;
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.5em;
    margin-bottom: 1em;
}

.markdown-content h2 {
    font-size: 1.75rem;
    border-bottom: 1px solid var(--border-subtle, rgba(128, 128, 128, 0.1));
    padding-bottom: 0.3em;
}

.markdown-content p {
    margin-bottom: 1.5em;
    font-size: 1.1rem;
}

.markdown-content ul,
.markdown-content ol {
    margin-bottom: 1.5em;
    padding-left: 1.5em;
}

.markdown-content li {
    margin-bottom: 0.5em;
}

.markdown-content strong {
    font-weight: 600;
    color: var(--text-primary);
}

.markdown-content a {
    color: var(--success);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.markdown-content a:hover {
    color: var(--success-hover);
}

.alert-info {
    padding: 16px;
    background-color: rgba(45, 139, 78, 0.08);
    border: 1px solid rgba(45, 139, 78, 0.2);
    border-radius: 8px;
    color: #1a5e33;
    margin-bottom: 32px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1rem;
    font-weight: 500;
}