:root {
    --paper: #f9f7f2;
    --ink: #1a1a1a;
    --ink-muted: #555555;
    --accent: #6366f1;
    --border: rgba(26, 26, 26, 0.1);
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    --btn-bg: #1a1a1a;
    --btn-text: #f9f7f2;
    --texture-opacity: 0.05;
}

.dark-theme {
    --paper: #121212;
    --ink: #e4e4e4;
    --ink-muted: #a0a0a0;
    --border: rgba(255, 255, 255, 0.1);
    --btn-bg: #e4e4e4;
    --btn-text: #121212;
    --texture-opacity: 0.15;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--paper);
    color: var(--ink);
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

.paper-texture {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    pointer-events: none;
    z-index: 1000;
    opacity: var(--texture-opacity);
    background-image: url("https://www.transparenttextures.com/patterns/natural-paper.png");
}

h1, h2, .serif-title {
    font-family: 'Instrument Serif', serif;
    font-weight: 400;
}

.ink-text {
    font-style: italic;
    color: var(--accent);
}

header {
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

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

.logo {
    font-family: 'Instrument Serif', serif;
    font-size: 2.2rem;
    letter-spacing: -1px;
}

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

.btn-ink {
    background-color: var(--btn-bg);
    color: var(--btn-text);
    padding: 0.8rem 1.8rem;
    border-radius: 4px;
    font-weight: 600;
    text-decoration: none;
}

.btn-ink.large {
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
}

.btn-outline {
    border: 1px solid var(--ink);
    color: var(--ink);
    padding: 0.8rem 1.8rem;
    border-radius: 4px;
    font-weight: 600;
    text-decoration: none;
}

#theme-toggle {
    background: none;
    border: 1px solid var(--border);
    padding: 0.5rem;
    cursor: pointer;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ink);
}

.dark-theme .sun-icon { display: block; }
.dark-theme .moon-icon { display: none; }
.light-theme .sun-icon { display: none; }
.light-theme .moon-icon { display: block; }

.hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 4rem auto;
    padding: 0 2rem;
    gap: 4rem;
}

.hero-content { flex: 1.2; }
.tag {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--accent);
    font-weight: 700;
    margin-bottom: 1rem;
    display: block;
}

.hero h1 { font-size: 5.5rem; line-height: 1; margin-bottom: 2rem; }
.hero p { font-size: 1.25rem; color: var(--ink-muted); max-width: 500px; margin-bottom: 3rem; }
.hero-btns { display: flex; gap: 1.5rem; }

.hero-image { flex: 1; }
.sketch-frame {
    padding: 1rem;
    background: white;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    border: 1px solid var(--border);
    transform: rotate(2deg);
}

.dark-theme .sketch-frame { background: #1e1e1e; }
.sketch-frame img { width: 100%; display: block; border-radius: 2px; }

.features { max-width: 1200px; margin: 10rem auto; padding: 0 2rem; }
.features h2 { font-size: 3.5rem; margin-bottom: 5rem; text-align: center; }
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 4rem; }
.feature-card { border-top: 1px solid var(--border); padding-top: 2rem; }
.feature-card h3 { font-size: 2.2rem; margin-bottom: 1rem; }
.feature-card p { color: var(--ink-muted); font-size: 1.1rem; }

.download { max-width: 1000px; margin: 10rem auto; padding: 0 2rem; }
.download-box {
    background-color: var(--paper);
    border: 1px solid var(--ink);
    padding: 5rem 4rem;
    border-radius: 4px;
    text-align: center;
    box-shadow: 12px 12px 0px var(--ink);
}

.download h2 { font-size: 4.5rem; margin-bottom: 1rem; }
.version-badge { color: var(--accent); font-weight: 700; margin-bottom: 4rem; text-transform: uppercase; letter-spacing: 1px; }

.download-options { display: grid; grid-template-columns: 1fr 1fr; gap: 5rem; text-align: left; }
.dl-group h4 { text-transform: uppercase; letter-spacing: 2px; font-size: 0.8rem; margin-bottom: 2rem; color: var(--ink-muted); }
.dl-btns { display: flex; flex-direction: column; gap: 1.2rem; }
.dl-link {
    display: block;
    padding: 1.2rem;
    border: 1px solid var(--border);
    text-decoration: none;
    color: var(--ink);
    font-weight: 600;
    border-radius: 4px;
    background: rgba(255,255,255,0.3);
}

.dl-link.active:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.dl-link.disabled { opacity: 0.4; cursor: not-allowed; }
.status-note { margin-top: 4rem; font-size: 0.95rem; color: var(--ink-muted); font-style: italic; }

footer { padding: 6rem 2rem; border-top: 1px solid var(--border); }
.footer-content { 
    max-width: 1200px; 
    margin: 0 auto; 
    display: flex; 
    justify-content: space-between; 
    align-items: center;
    color: var(--ink-muted); 
    font-size: 0.9rem;
}
.footer-links { display: flex; gap: 2.5rem; }
.footer-links a {
    position: relative;
    padding: 0.2rem 0;
    opacity: 0.8;
}
.footer-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background-color: var(--ink);
    transition: width 0.3s ease;
}
.footer-links a:hover { 
    opacity: 1;
    color: var(--ink); 
}
.footer-links a:hover::after {
    width: 100%;
}

@media (max-width: 900px) {
    .hero { flex-direction: column; text-align: center; }
    .hero h1 { font-size: 4rem; }
    .hero-btns { justify-content: center; }
    .download-options { grid-template-columns: 1fr; }
    .download-box { padding: 3rem 1.5rem; }
}
