/* Modern Reset */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

:root {
    /* Greptile-inspired Palette */
    --bg-color: #F1EFEB;
    --text-color: #1a1a1a;
    --text-muted: #666666;
    --accent-color: #107A4D;
    /* Greptile Green */
    --accent-hover: #0d613d;

    --border-color: #e5e5e5;
    --grid-line: rgba(0, 0, 0, 0.06);

    /* Typefaces */
    --font-heading: 'Space Grotesk', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    --font-body: 'Inter', sans-serif;

    --nav-height: 70px;
    --container-width: 1200px;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-body);
    overflow-x: hidden;
    line-height: 1.6;
    /* Dot Grid Background */
    background-image:
        linear-gradient(var(--grid-line) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
    background-size: 40px 40px;
    background-position: center top;
}

/* Typography Overrides */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: #000;
    font-weight: 600;
    letter-spacing: -0.02em;
}

/* Tech/Mono Accents */
.mono {
    font-family: var(--font-mono);
    font-size: 0.9em;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

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

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
}

/* Navbar */
nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    z-index: 100;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
    border-bottom: 1px solid transparent;
}

nav.scrolled {
    background: rgba(5, 5, 5, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border);
}

.nav-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-link {
    opacity: 0.7;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 8px;
}

.nav-link:hover {
    opacity: 1;
    background: var(--glass-bg);
}

/* Utility Classes */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
    z-index: 1;
}

.text-gradient {
    color: var(--accent-color);
    background: none;
    -webkit-text-fill-color: initial;
}

/* Navbar */
nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    z-index: 100;
    display: flex;
    align-items: center;
    background: rgba(241, 239, 235, 0.8);
    /* Matches bg-color with opacity */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
}

.nav-container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-link {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--text-color);
    padding: 0.5rem 1rem;
    border-radius: 4px;
    opacity: 0.7;
}

.nav-link:hover {
    opacity: 1;
    background: rgba(0, 0, 0, 0.04);
}

/* Hero Section */
.hero {
    min-height: 90vh;
    display: flex;
    align-items: center;
    padding-top: var(--nav-height);
    position: relative;
}

.hero-content {
    max-width: 1000px;
    margin: 0 auto;
    text-align: left;
    /* Greptile is often left-aligned */
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 4rem;
    align-items: center;
}

.hero h1 {
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    letter-spacing: -0.03em;
}

.hero p {
    font-size: 1.15rem;
    margin-bottom: 2.5rem;
    max-width: 500px;
    opacity: 0.8;
}

/* Technical Buttons */
.download-group {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.8rem 1.5rem;
    border-radius: 4px;
    /* Square technical look */
    font-weight: 500;
    font-family: var(--font-mono);
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
    position: relative;
}

.btn-primary {
    background: var(--accent-color);
    color: white;
    box-shadow: 4px 4px 0px rgba(0, 0, 0, 0.1);
}

.btn-primary:hover {
    transform: translate(-1px, -1px);
    box-shadow: 6px 6px 0px rgba(0, 0, 0, 0.15);
    background: var(--accent-hover);
}

.btn-primary:active {
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0px rgba(0, 0, 0, 0.1);
}

.btn svg {
    width: 18px;
    height: 18px;
}

/* Preview Image */
.hero-image-container {
    perspective: 1000px;
}

.hero-image img {
    width: 100%;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    box-shadow: 20px 20px 0px rgba(0, 0, 0, 0.05);
    /* Technical hard shadow */
}

/* Features Grid */
.features {
    padding: 8rem 0;
    border-top: 1px dashed var(--border-color);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 0;
    /* Bento grids often have collapsed borders */
    border: 1px dashed var(--border-color);
    background: rgba(255, 255, 255, 0.4);
}

.feature-card {
    background: transparent;
    border: 1px dashed var(--border-color);
    padding: 3rem;
    margin: -1px;
    /* Collapse borders */
    transition: background 0.2s ease;
}

.feature-card:hover {
    background: #fff;
    z-index: 10;
    border-style: solid;
    border-color: var(--accent-color);
}

.icon-box {
    margin-bottom: 1.5rem;
    color: var(--accent-color);
}

.icon-box svg {
    width: 32px;
    height: 32px;
    stroke-width: 1.5;
}

.feature-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.feature-card p {
    font-size: 0.95rem;
    line-height: 1.7;
}

/* Footer */
footer {
    padding: 4rem 0;
    border-top: 1px solid var(--border-color);
    background: var(--bg-color);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-content h3 {
    font-family: var(--font-heading);
    font-size: 1.2rem;
}

.legal-links {
    display: flex;
    gap: 2rem;
    font-family: var(--font-mono);
    font-size: 0.85rem;
}

.legal-links a:hover {
    color: var(--accent-color);
    text-decoration: underline;
}

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

    .download-group {
        align-items: center;
    }

    .hero h1 {
        font-size: 3rem;
    }

    .nav-container {
        padding: 0 1.5rem;
    }

}

/* Legal Pages */
.legal-banner {
    padding: 8rem 0 4rem;
    background: var(--bg-color);
    text-align: center;
    border-bottom: 1px dashed var(--border-color);
}

.legal-banner h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.legal-banner .subtitle {
    font-family: var(--font-mono);
    color: var(--text-muted);
    font-size: 1rem;
}

.legal-content-body {
    max-width: 800px;
    margin: 4rem auto;
    background: #fff;
    padding: 3rem;
    border: 1px dashed var(--border-color);
    border-radius: 8px;
}

.legal-meta {
    display: block;
    margin-bottom: 3rem;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text-muted);
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.legal-content-body h2 {
    font-size: 1.8rem;
    margin-top: 3rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--grid-line);
}

.legal-content-body h3 {
    font-size: 1.3rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.legal-content-body p,
.legal-content-body li {
    font-size: 1.05rem;
    line-height: 1.8;
    color: #444;
    margin-bottom: 1rem;
}

.legal-content-body ul {
    list-style-position: inside;
    margin-bottom: 1.5rem;
    padding-left: 1rem;
}

.legal-content-body li {
    margin-bottom: 0.5rem;
}