/* MD Editor - Style based on IslandLauncher Lux Minimalism */

:root {
    /* Colors - Clean & Professional */
    --bg-body: #FFFFFF;
    --bg-surface: #F8F9FA;
    --text-main: #202124;
    --text-muted: #5F6368;
    --accent-color: #1A73E8;
    /* Google Blueish */
    --accent-hover: #1557B0;
    --line-color: #E8EAED;

    /* Typography */
    --font-heading: 'Playfair Display', serif;
    /* Keeping serif for premium feel */
    --font-body: 'Outfit', sans-serif;

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 8rem;

    /* Transitions */
    --trans-fast: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    --trans-slow: 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme='dark'] {
    --bg-body: #0F0F11;
    --bg-surface: #1C1C1E;
    --text-main: #F5F5F7;
    --text-muted: #86868B;
    --accent-color: #8AB4F8;
    --accent-hover: #AECBFA;
    --line-color: #2C2C2E;
}

/* Reset & Base */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    background-color: var(--bg-body);
    color: var(--text-main);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color var(--trans-slow), color var(--trans-slow);
}

/* Typography Utility */
h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    font-weight: 400;
    line-height: 1.1;
}

h1 {
    font-size: clamp(3rem, 8vw, 6rem);
    letter-spacing: -0.02em;
}

h2 {
    font-size: clamp(2rem, 5vw, 4rem);
    margin-bottom: var(--spacing-sm);
}

.serif {
    font-style: italic;
    color: var(--accent-color);
}

.italic {
    font-style: italic;
    font-weight: 400;
}

p {
    font-size: 1.125rem;
    color: var(--text-muted);
    max-width: 60ch;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--trans-fast);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: 500;
    letter-spacing: 0.02em;
    transition: all var(--trans-fast);
    cursor: pointer;
    font-size: 1rem;
}

.btn-primary {
    background-color: var(--text-main);
    color: var(--bg-surface);
    border: 1px solid var(--text-main);
}

.btn-primary:hover {
    background-color: transparent;
    color: var(--text-main);
}

.btn-secondary {
    background-color: transparent;
    color: var(--text-main);
    border: 1px solid var(--line-color);
    margin-left: 1rem;
}

.btn-secondary:hover {
    border-color: var(--text-main);
}

/* Layout */
.container {
    width: 90%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
}

.section {
    padding: var(--spacing-xl) 0;
    position: relative;
}

.center {
    text-align: center;
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: var(--spacing-sm) var(--spacing-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    color: var(--text-main);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

[data-theme='dark'] .header {
    mix-blend-mode: normal;
    color: var(--text-main);
    background: rgba(15, 15, 17, 0.8);
}

.logo {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-family: var(--font-heading);
    font-size: 1.5rem;
}

.logo-image {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.home-link {
    display: flex;
    align-items: center;
    padding-right: 1rem;
    border-right: 1px solid var(--line-color);
    transition: transform 0.3s var(--trans-fast);
}

.home-link:hover {
    transform: scale(1.1);
}

.home-icon {
    width: 28px;
    height: auto;
    filter: brightness(0);
    opacity: 0.8;
}

[data-theme='dark'] .home-icon {
    filter: brightness(0) invert(1);
}

.nav {
    display: none;
}

@media (min-width: 768px) {
    .nav {
        display: flex;
        gap: 2rem;
    }
}

/* Hero Section */
.hero-section {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    /* Fallback gradient if image not found */
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.1);
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.4);
}

[data-theme='dark'] .hero-overlay {
    background: rgba(0, 0, 0, 0.6);
}

.hero-content {
    text-align: center;
    z-index: 3;
    margin-top: -10vh;
    /* Adjusted for better centering without visuals */
    color: var(--text-main);
}

.hero-title {
    display: flex;
    flex-direction: column;
    margin-bottom: var(--spacing-sm);
}

.hero-cta {
    margin-top: var(--spacing-md);
}

/* Concept Section */
.concept-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
    align-items: center;
}

@media (min-width: 900px) {
    .concept-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.concept-visual {
    position: relative;
    height: 400px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.island-shape {
    position: absolute;
    background-color: var(--line-color);
    transition: all 0.5s ease;
}

/* Abstract shapes for editor concept */
.shape-1 {
    width: 20rem;
    height: 25rem;
    top: 5%;
    left: 10%;
    border-radius: 4px;
    transform: rotate(-5deg);
    background: linear-gradient(135deg, #ffffff 0%, #f0f0f0 100%);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--line-color);
}

.shape-2 {
    width: 18rem;
    height: 22rem;
    bottom: 5%;
    right: 15%;
    border-radius: 4px;
    transform: rotate(5deg);
    background: var(--bg-surface);
    border: 1px solid var(--line-color);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.05);
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-md);
    margin-top: var(--spacing-lg);
}

.feature-card {
    padding: var(--spacing-md);
    border: 1px solid var(--line-color);
    border-radius: 12px;
    transition: transform var(--trans-fast), border-color var(--trans-fast);
}

.feature-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-color);
}

.feature-icon {
    font-size: 2rem;
    margin-bottom: var(--spacing-sm);
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: var(--spacing-xs);
    font-family: var(--font-heading);
}

/* Mockup & Workflow */
.split-layout {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
}

@media (min-width: 900px) {
    .split-layout {
        flex-direction: row;
        align-items: center;
    }
}

.split-content {
    flex: 1;
}

.split-visual {
    flex: 1;
    display: flex;
    justify-content: center;
}

.situation-tabs {
    display: flex;
    margin-top: var(--spacing-md);
    gap: 1rem;
    flex-wrap: wrap;
}

.situation-btn {
    padding: 0.75rem 1.5rem;
    border: 1px solid var(--line-color);
    background: transparent;
    border-radius: 30px;
    font-family: var(--font-body);
    color: var(--text-muted);
    cursor: pointer;
    transition: all var(--trans-fast);
}

.situation-btn.active,
.situation-btn:hover {
    background: var(--text-main);
    color: var(--bg-surface);
    border-color: var(--text-main);
}

/* Browser Mockup Reuse */
/* Browser Mockup Updated for Images */
.browser-mockup {
    width: 100%;
    max-width: 600px;
    aspect-ratio: 16 / 10;
    background: transparent;
    border-radius: 12px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.12);
    position: relative;
    overflow: hidden;
}

.workflow-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    transform: scale(1.02);
    /* Slight zoom for effect */
    transition: opacity 0.5s ease, transform 0.8s ease;
}

.workflow-img.active {
    opacity: 1;
    transform: scale(1);
    z-index: 2;
}

/* CTA */
.cta-section {
    background-color: var(--bg-surface);
    border-top: 1px solid var(--line-color);
}

.store-search-container {
    max-width: 600px;
    margin: var(--spacing-md) auto;
}

.store-link-wrapper {
    display: flex;
    align-items: center;
    background: var(--bg-body);
    padding: 0.5rem 1.5rem;
    border-radius: 100px;
    border: 1px solid var(--line-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    text-decoration: none;
    gap: 1rem;
}

.fake-search-bar {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
    color: var(--text-muted);
}

.typing-text {
    color: var(--text-main);
    font-weight: 500;
}

.cursor {
    display: inline-block;
    width: 2px;
    background-color: var(--accent-color);
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    50% {
        opacity: 0;
    }
}

/* Footer */
.footer {
    padding: var(--spacing-lg) 0;
    border-top: 1px solid var(--line-color);
    font-size: 0.875rem;
}

.footer-row {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

@media (min-width: 768px) {
    .footer-row {
        flex-direction: row;
        justify-content: space-between;
    }
}

.cursor-follower {
    position: fixed;
    width: 30px;
    height: 30px;
    border: 1px solid var(--accent-color);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    transform: translate(-50%, -50%);
    transition: transform 0.1s;
    mix-blend-mode: exclusion;
}