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

:root {
    --text-primary: #1a1a1a;
    --text-secondary: #666;
    --text-light: #999;
    --bg-primary: #ffffff;
    --bg-code: #f5f5f5;
    --border-color: #e5e5e5;
    --link-color: #0066cc;
    --button-bg: #000000;
    --button-text: #ffffff;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Header */
.header {
    padding: 24px 0;
    border-bottom: 1px solid var(--border-color);
}

.nav {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.logo:hover {
    opacity: 0.7;
}

.logo-icon {
    width: 32px;
    height: 32px;
    border-radius: 6px;
}

.logo-text {
    font-family: 'Inter', sans-serif;
    font-size: 20px;
    font-weight: 500;
    letter-spacing: 0.01em;
    color: var(--text-primary);
}

.nav-links {
    display: flex;
    gap: 32px;
    align-items: center;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 15px;
    transition: color 0.2s;
    display: inline-flex;
    align-items: center;
}

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

.nav-cta-button {
    background: var(--button-bg);
    color: var(--button-text) !important;
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 500;
    transition: transform 0.2s, box-shadow 0.2s;
}

.nav-cta-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* Main Content */
.main {
    max-width: 900px;
    margin: 0 auto;
    padding: 80px 24px;
}

/* Hero Section */
.hero {
    text-align: center;
    margin-bottom: 60px;
}

/* Hero Images with Fade Effect */
.hero-images {
    position: relative;
    width: 100%;
    max-width: 1200px;
    margin: 20px auto 0;
    border-radius: 0;
    overflow: hidden;
    box-shadow: none;
    background: transparent;
    aspect-ratio: 3140 / 2212;  /* Fixed aspect ratio for consistency */
}

/* All images use the same sizing */
.hero-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 2s ease-in-out;
}

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

.hero-image.active {
    opacity: 1;
}

/* First image visible by default */
.hero-image:first-child {
    opacity: 1;
}

/* Page Header (for non-hero pages) */
.page-header {
    text-align: center;
    margin-bottom: 60px;
}

.page-header + .manifesto-box {
    margin-top: -20px;
}

/* Legal Page Header (left-aligned) */
.legal-page-header {
    text-align: left;
    margin-bottom: 40px;
}

.legal-page-header h1 {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 12px;
    text-align: left;
}

.legal-page-header .tagline {
    font-size: 18px;
    color: var(--text-secondary);
    text-align: left;
    margin: 0;
}

.hero h1 {
    font-size: 48px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.03em;
    color: var(--text-primary);
    margin-bottom: 20px;
}

.tagline {
    font-size: 20px;
    color: var(--text-secondary);
    line-height: 1.5;
    max-width: 600px;
    margin: 0 auto 40px;
}

/* CTA Section */
.cta-section {
    margin-bottom: 20px;
}

.buy-button {
    display: inline-block;
    background: var(--button-bg);
    color: var(--button-text);
    padding: 14px 28px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    font-size: 16px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.buy-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

.subtext {
    display: block;
    margin-top: 12px;
    color: var(--text-light);
    font-size: 14px;
}

.requirements {
    color: var(--text-light);
    font-size: 14px;
    margin-top: 8px;
}

/* Code Block */
.demo {
    margin: 60px 0;
}

.code-block {
    background: var(--bg-code);
    border-radius: 8px;
    padding: 24px;
    overflow-x: auto;
    border: 1px solid var(--border-color);
}

.code-block pre {
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-primary);
}

.code-block code {
    font-family: inherit;
}

/* Terminal Image Section */
.terminal-section {
    margin: 60px 0;
    text-align: center;
}

.terminal-image {
    background: #f9f9f9;
    border-radius: 8px;
    padding: 40px;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
    position: relative;
    cursor: grab;
}

.terminal-image:active {
    cursor: grabbing;
}

.terminal-image img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}

.terminal-image::before {
    content: "Terminal Preview";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--text-light);
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    opacity: 0.5;
}

/* Story Teaser Section (Homepage) */
.story-teaser {
    margin: 80px 0;
    padding: 60px 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    text-align: center;
}

.story-link {
    font-size: 48px;
    font-weight: 600;
    color: var(--text-primary);
    text-decoration: none;
    letter-spacing: -0.02em;
    transition: opacity 0.2s;
    display: inline-block;
}

.story-link:hover {
    opacity: 0.6;
}

/* Story Page Content */
.story-content {
    max-width: 700px;
    margin: 0 auto;
}

.story-content p {
    font-size: 17px;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.story-content p:last-of-type {
    margin-bottom: 0;
    margin-top: 32px;
    text-align: center;
}

.story-content em {
    font-style: italic;
    color: var(--text-primary);
}

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

/* Manifesto Box */
.manifesto-box {
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 40px;
    margin-bottom: 60px;
}

.manifesto-box .story-content ul {
    margin-left: 24px;
    margin-bottom: 24px;
}

.manifesto-box .story-content li {
    margin-bottom: 8px;
}

.manifesto-box .story-content p:last-of-type {
    text-align: left;
}

/* Signature */
.signature {
    margin-top: 60px;
    text-align: right;
    padding-right: 40px;
}

.signature span {
    font-family: 'Dancing Script', cursive;
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
}

/* License Intro */
.license-intro {
    max-width: 700px;
    margin: 40px auto 60px;
    text-align: center;
}

.license-intro p {
    font-size: 18px;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.license-intro p:last-child {
    font-weight: 600;
    color: var(--text-primary);
    margin-top: 32px;
}

/* Pricing Section */
.pricing {
    margin: 80px 0;
    display: flex;
    justify-content: center;
}

.pricing-card {
    max-width: 500px;
    width: 100%;
    padding: 48px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: var(--bg-primary);
    position: relative;
}

.pricing-badge {
    position: absolute;
    top: 24px;
    right: 24px;
    background: var(--text-primary);
    color: var(--bg-primary);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.pricing-header {
    margin-bottom: 32px;
}

.pricing-header h2 {
    font-size: 32px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.pricing-subtitle {
    font-size: 16px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.pricing-price {
    margin-bottom: 32px;
    padding-bottom: 32px;
    border-bottom: 1px solid var(--border-color);
}

.price-amount {
    font-size: 48px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.03em;
}

.price-period {
    font-size: 16px;
    color: var(--text-secondary);
    margin-left: 8px;
}

.pricing-features {
    margin-bottom: 32px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.pricing-feature {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 15px;
    color: var(--text-secondary);
}

.pricing-feature .check {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 18px;
}

.pricing-button {
    display: block;
    width: 100%;
    background: var(--button-bg);
    color: var(--button-text);
    padding: 16px 32px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    font-size: 16px;
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
}

.pricing-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

/* FAQ Section */
.faq-section {
    max-width: 700px;
    margin: 80px auto;
}

.faq-section h2 {
    font-size: 32px;
    font-weight: 600;
    margin-bottom: 32px;
    color: var(--text-primary);
    text-align: center;
    letter-spacing: -0.02em;
}

.faq-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.faq-item {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    background: var(--bg-primary);
}

.faq-question {
    width: 100%;
    padding: 20px 24px;
    background: none;
    border: none;
    font-family: inherit;
    font-size: 16px;
    font-weight: 500;
    color: var(--text-primary);
    text-align: left;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    transition: background-color 0.2s;
}

.faq-question:hover {
    background-color: var(--bg-code);
}

.faq-icon {
    font-size: 24px;
    font-weight: 300;
    color: var(--text-secondary);
    transition: transform 0.3s;
    flex-shrink: 0;
}

.faq-item.active .faq-icon {
    transform: rotate(45deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.faq-item.active .faq-answer {
    max-height: 500px;
}

.faq-answer p {
    padding: 0 24px 20px 24px;
    color: var(--text-secondary);
    line-height: 1.7;
    font-size: 15px;
}

/* Features Section */
.features {
    margin: 80px 0;
}

.features h2 {
    font-size: 32px;
    font-weight: 600;
    margin-bottom: 24px;
    color: var(--text-primary);
    text-align: left;
    letter-spacing: -0.02em;
}

.features-list {
    display: flex;
    flex-direction: column;
    gap: 80px;
}

.feature-row {
    display: flex;
    align-items: center;
    gap: 60px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 40px;
    min-height: 450px;
    height: 450px;
}

.feature-row.reverse {
    flex-direction: row-reverse;
}

/* Reduce height for features after inbox (3rd feature onwards) */
.feature-row:nth-child(n+3) {
    min-height: 315px;
    height: 315px;
}

.feature-content {
    flex: 1;
    text-align: left;
}

.feature-content.full-width {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.feature-image {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #27292D;
    border-radius: 16px;
    padding: 30px;
    align-self: stretch;
    overflow: hidden;
}

.feature-row .feature-image {
    justify-content: center;
}

.feature-row.reverse .feature-image {
    justify-content: center;
}

.feature-image picture {
    display: contents;
}

.feature-image img {
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    box-shadow: none;
    border-radius: 8px !important;
    display: block;
}

.feature-icon {
    width: 40px;
    height: 40px;
    margin-bottom: 16px;
}

.feature-icon svg {
    width: 100%;
    height: 100%;
    color: var(--text-primary);
}

.feature-content h3 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.feature-content p {
    font-size: 16px;
    color: var(--text-secondary);
    line-height: 1.6;
}

.feature-content.full-width h3 {
    text-align: center;
}

.feature-content.full-width p {
    text-align: center;
}

.feature-content.full-width .feature-icon {
    margin: 0 auto 16px;
}

/* One-time Payment Feature Box */
.feature-row.payment-feature {
    background-color: #000000;
    height: 300px;
    min-height: 300px;
}

.feature-row.payment-feature .feature-content h3,
.feature-row.payment-feature .feature-content p {
    color: #ffffff;
}

.feature-row.payment-feature .feature-icon svg {
    color: #ffffff;
}

.payment-cta-button {
    display: inline-block;
    background: #ffffff;
    color: #000000;
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    font-size: 15px;
    margin-top: 20px;
    transition: transform 0.2s, opacity 0.2s;
}

.payment-cta-button:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}

/* Legal Content */
.legal-content {
    line-height: 1.8;
    color: var(--text-secondary);
}

.legal-content h2 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin-top: 40px;
    margin-bottom: 16px;
}

.legal-content h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-top: 30px;
    margin-bottom: 12px;
}

.legal-content p {
    margin-bottom: 16px;
}

.legal-content ul, .legal-content ol {
    margin-bottom: 16px;
    padding-left: 24px;
}

.legal-content li {
    margin-bottom: 8px;
}

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

/* Changelog Filters */
.changelog-filters {
    display: flex;
    gap: 16px;
    margin-top: 32px;
    margin-bottom: 16px;
}

.filter-select {
    padding: 8px 12px;
    padding-right: 24px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
    cursor: pointer;
    transition: border-color 0.2s;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 6px center;
    background-size: 16px;
}

.filter-select:hover {
    border-color: var(--text-primary);
}

.filter-select:focus {
    outline: none;
    border-color: var(--text-primary);
}

/* Changelog Section */
.changelog {
    margin: 80px 0;
    padding-top: 60px;
}

.changelog h2 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 32px;
    color: var(--text-primary);
}

.changelog-entries {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.changelog-entry {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.changelog-entry .date {
    font-size: 14px;
    color: var(--text-light);
}

.changelog-entry .version {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.changelog-entry p {
    font-size: 15px;
    color: var(--text-secondary);
    margin-top: 4px;
}

/* Footer */
.footer {
    border-top: 1px solid var(--border-color);
    padding: 40px 0;
    margin-top: 100px;
}

.footer-content {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-size: 14px;
    color: var(--text-secondary);
}

.footer-row {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    justify-content: center;
}

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

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

.separator {
    color: var(--text-light);
}

.footer-icon {
    width: 24px;
    height: 24px;
    border-radius: 5px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav {
        padding: 0 20px;
    }

    .nav-links {
        gap: 20px;
    }

    .nav-links a:not(.nav-cta-button) {
        display: none;
    }

    .nav-links a {
        font-size: 14px;
    }

    .nav-cta-button {
        padding: 8px 16px;
        font-size: 14px;
    }

    .logo-text {
        font-size: 18px;
    }

    .main {
        padding: 60px 20px;
    }

    .hero h1 {
        font-size: 36px;
    }

    .tagline {
        font-size: 18px;
    }

    .features-list {
        gap: 60px;
    }

    .feature-row,
    .feature-row.reverse,
    .feature-row:nth-child(n+3) {
        flex-direction: column;
        gap: 32px;
        height: auto;
        min-height: auto;
    }

    .feature-image {
        width: 100%;
        max-width: 500px;
        margin: 0 auto;
    }

    .feature-content h3 {
        font-size: 20px;
    }

    .feature-content p {
        font-size: 15px;
    }

    .hero-images {
        margin-top: 40px;
    }

    .code-block {
        padding: 16px;
        font-size: 12px;
    }

    .terminal-image {
        padding: 20px;
        min-height: 300px;
    }

    .story-link {
        font-size: 36px;
    }

    .signature {
        padding-right: 20px;
    }

    .signature span {
        font-size: 28px;
    }

    .pricing-card {
        padding: 32px 24px;
    }

    .pricing-badge {
        top: 16px;
        right: 16px;
        font-size: 11px;
        padding: 4px 10px;
    }

    .pricing-header h2 {
        font-size: 28px;
    }

    .price-amount {
        font-size: 40px;
    }

    .license-intro p {
        font-size: 17px;
    }

    .faq-section h2 {
        font-size: 28px;
    }

    .faq-question {
        padding: 16px 20px;
        font-size: 15px;
    }

    .faq-answer p {
        font-size: 14px;
    }

    .manifesto-box {
        padding: 32px 24px;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 28px;
    }

    .tagline {
        font-size: 16px;
    }

    .buy-button {
        padding: 12px 24px;
        font-size: 15px;
    }

    .nav-links {
        gap: 12px;
    }

    .nav-links a {
        font-size: 13px;
    }

    .nav-cta-button {
        padding: 8px 14px;
        font-size: 13px;
    }

    .logo-text {
        font-size: 16px;
    }

    .logo-icon {
        width: 28px;
        height: 28px;
    }

    .footer-content {
        flex-direction: column;
        gap: 8px;
    }

    .separator {
        display: none;
    }

    .story-link {
        font-size: 28px;
    }

    .signature {
        padding-right: 10px;
    }

    .signature span {
        font-size: 24px;
    }

    .pricing-card {
        padding: 24px 20px;
    }

    .pricing-header h2 {
        font-size: 24px;
    }

    .price-amount {
        font-size: 36px;
    }

    .license-intro p {
        font-size: 16px;
    }

    .faq-section h2 {
        font-size: 24px;
    }

    .faq-question {
        padding: 14px 16px;
        font-size: 14px;
    }

    .faq-icon {
        font-size: 20px;
    }

    .features-list {
        gap: 40px;
    }

    .feature-row,
    .feature-row.reverse {
        gap: 24px;
    }

    .feature-content h3 {
        font-size: 18px;
    }

    .feature-content p {
        font-size: 14px;
    }

    .hero-images {
        aspect-ratio: 3140 / 2212;  /* Maintain correct aspect ratio */
        margin-top: 32px;
    }

    .manifesto-box {
        padding: 24px 20px;
    }
}