/* MD-To Website - Hand-Drawn Sketch Style CSS */

/* Import Google Fonts - Handwritten Style */
@import url('https://fonts.googleapis.com/css2?family=Patrick+Hand&family=Caveat:wght@400;500;600;700&family=Indie+Flower&display=swap');

/* CSS Variables - Hand-Drawn Theme */
:root {
    --bg-paper: #fdfbf7;
    --bg-paper-dark: #f5f0e6;
    --ink-primary: #2c3e50;
    --ink-light: #5d6d7e;
    --accent-yellow: #ffeaa7;
    --accent-red: #ff7675;
    --accent-blue: #74b9ff;
    --accent-green: #55efc4;
    --shadow-hard: 4px 4px 0px #2c3e50;
    --shadow-soft: 2px 2px 0px rgba(44, 62, 80, 0.3);
    --border-sketch: 3px solid #2c3e50;
    --font-heading: 'Patrick Hand', cursive;
    --font-body: 'Caveat', cursive;
    --font-alt: 'Indie Flower', cursive;
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 18px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-paper);
    background-image:
        linear-gradient(var(--bg-paper-dark) 1px, transparent 1px),
        linear-gradient(90deg, var(--bg-paper-dark) 1px, transparent 1px);
    background-size: 20px 20px;
    color: var(--ink-primary);
    line-height: 1.6;
    min-height: 100vh;
}

/* Paper texture overlay */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%' height='100%' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: -1;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 400;
    line-height: 1.2;
    color: var(--ink-primary);
}

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

h2 {
    font-size: 2.2rem;
    margin-bottom: 0.8rem;
}

h3 {
    font-size: 1.6rem;
    margin-bottom: 0.6rem;
}

p {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--ink-light);
}

a {
    color: var(--ink-primary);
    text-decoration: none;
    border-bottom: 2px solid var(--accent-yellow);
    transition: all 0.2s ease;
}

a:hover {
    background-color: var(--accent-yellow);
    border-bottom-color: var(--accent-red);
}

/* Layout Container */
.container {
    max-width: 1024px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header / Navigation */
header {
    background: var(--bg-paper);
    border-bottom: var(--border-sketch);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-soft);
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

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

.logo-text {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    color: var(--ink-primary);
    border: none;
    background: none;
}

.logo-text:hover {
    background: none;
    transform: rotate(-2deg);
}

nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}

nav a {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    border: none;
    position: relative;
}

nav a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--accent-yellow);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s ease;
}

nav a:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

nav a:hover {
    background: none;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 4rem 0;
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, var(--accent-yellow) 0%, transparent 70%);
    opacity: 0.5;
    z-index: -1;
}

.hero h1 {
    font-size: 3.5rem;
    position: relative;
}

.hero h1::after {
    content: '';
    display: block;
    width: 150px;
    height: 8px;
    background: var(--accent-red);
    margin: 10px auto 0;
    border-radius: 4px;
    transform: rotate(-1deg);
    opacity: 0.6;
}

.hero p {
    font-size: 1.5rem;
    max-width: 600px;
    margin: 1rem auto 2rem;
}

/* Drop Zone / Upload Area */
.drop-zone {
    border: 4px dashed var(--ink-primary);
    border-radius: 20px;
    padding: 3rem;
    text-align: center;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    max-width: 600px;
    margin: 0 auto;
}

.drop-zone::before {
    content: '';
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    border: 3px solid var(--ink-primary);
    border-radius: 25px;
    opacity: 0.3;
    transform: rotate(1deg);
}

.drop-zone:hover {
    transform: scale(1.02) rotate(0.5deg);
    box-shadow: var(--shadow-hard);
    background: var(--accent-yellow);
}

.drop-zone.drag-over {
    background: var(--accent-blue);
    border-style: solid;
    transform: scale(1.05);
}

.drop-zone-icon {
    width: 80px;
    height: 80px;
    margin-bottom: 1rem;
}

.drop-zone h3 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.drop-zone p {
    font-size: 1.2rem;
    margin-bottom: 0;
}

.drop-zone input[type="file"] {
    display: none;
}

/* Button Styles */
.btn {
    display: inline-block;
    font-family: var(--font-heading);
    font-size: 1.2rem;
    padding: 0.8rem 2rem;
    border: 3px solid var(--ink-primary);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-hard);
    background: white;
    position: relative;
}

.btn:hover {
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0px var(--ink-primary);
}

.btn:active {
    transform: translate(4px, 4px);
    box-shadow: none;
}

.btn-primary {
    background: var(--accent-yellow);
}

.btn-secondary {
    background: var(--accent-blue);
}

.btn-accent {
    background: var(--accent-green);
}

/* Feature Cards Grid */
.features {
    padding: 3rem 0;
}

.features h2 {
    text-align: center;
    margin-bottom: 2rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    padding: 1rem 0;
}

.feature-card {
    background: white;
    border: 3px solid var(--ink-primary);
    border-radius: 15px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    box-shadow: var(--shadow-soft);
}

.feature-card::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 25px;
    background: var(--accent-yellow);
    border-radius: 3px;
    border: 2px solid var(--ink-primary);
}

.feature-card:hover {
    transform: translateY(-5px) rotate(1deg);
    box-shadow: var(--shadow-hard);
}

.feature-icon {
    width: 60px;
    height: 60px;
    margin-bottom: 1rem;
}

.feature-card h3 {
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
}

.feature-card p {
    font-size: 1.1rem;
    margin-bottom: 0;
}

/* Why Section */
.why-section {
    padding: 3rem 0;
    background: white;
    border-top: var(--border-sketch);
    border-bottom: var(--border-sketch);
    margin: 2rem 0;
}

.why-section h2 {
    text-align: center;
}

.why-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.why-item {
    text-align: center;
    padding: 1.5rem;
}

.why-icon {
    width: 50px;
    height: 50px;
    margin-bottom: 1rem;
}

.why-item h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

/* Steps Section */
.steps-section {
    padding: 3rem 0;
}

.steps-section h2 {
    text-align: center;
    margin-bottom: 2rem;
}

.steps {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 2rem;
    align-items: flex-start;
}

.step {
    text-align: center;
    max-width: 200px;
    position: relative;
}

.step-number {
    width: 60px;
    height: 60px;
    background: var(--accent-red);
    border: 3px solid var(--ink-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-family: var(--font-heading);
    font-size: 1.8rem;
    color: white;
    box-shadow: var(--shadow-hard);
}

.step h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.step p {
    font-size: 1.1rem;
}

/* Arrow between steps */
.step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 30px;
    right: -30px;
    width: 40px;
    height: 4px;
    background: var(--ink-primary);
    transform: rotate(15deg);
}

/* Preview Section */
.preview-section {
    padding: 3rem 0;
}

.preview-section h2 {
    text-align: center;
    margin-bottom: 2rem;
}

.preview-box {
    background: #1e1e1e;
    border: 3px solid var(--ink-primary);
    border-radius: 15px;
    padding: 1.5rem;
    max-width: 800px;
    margin: 0 auto;
    box-shadow: var(--shadow-hard);
}

.preview-header {
    display: flex;
    gap: 8px;
    margin-bottom: 1rem;
}

.preview-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid var(--ink-primary);
}

.preview-dot.red { background: var(--accent-red); }
.preview-dot.yellow { background: var(--accent-yellow); }
.preview-dot.green { background: var(--accent-green); }

.preview-content {
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    color: #d4d4d4;
    line-height: 1.8;
    overflow-x: auto;
}

/* FAQ Section */
.faq-section {
    padding: 3rem 0;
}

.faq-section h2 {
    text-align: center;
    margin-bottom: 2rem;
}

.faq-item {
    background: white;
    border: 3px solid var(--ink-primary);
    border-radius: 10px;
    margin-bottom: 1rem;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
}

.faq-question {
    padding: 1rem 1.5rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: var(--font-heading);
    font-size: 1.3rem;
}

.faq-question:hover {
    background: var(--accent-yellow);
}

.faq-icon {
    width: 24px;
    height: 24px;
    transition: transform 0.3s ease;
}

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

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

.faq-item.open .faq-answer {
    padding: 0 1.5rem 1.5rem;
    max-height: 300px;
}

.faq-answer p {
    font-size: 1.1rem;
}

/* CTA Section */
.cta-section {
    text-align: center;
    padding: 4rem 0;
    background: var(--accent-yellow);
    border-top: var(--border-sketch);
    border-bottom: var(--border-sketch);
    margin-top: 2rem;
}

.cta-section h2 {
    margin-bottom: 1rem;
}

.cta-section p {
    font-size: 1.4rem;
    margin-bottom: 2rem;
}

/* Footer */
footer {
    background: var(--ink-primary);
    color: white;
    padding: 2rem 0;
    text-align: center;
    margin-top: 3rem;
}

footer p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.1rem;
}

footer a {
    color: var(--accent-yellow);
    border-bottom-color: var(--accent-yellow);
}

footer a:hover {
    background: rgba(255, 234, 167, 0.2);
}

/* Page-specific Header */
.page-header {
    text-align: center;
    padding: 3rem 0 2rem;
}

.page-header h1 {
    font-size: 2.8rem;
}

.page-header p {
    font-size: 1.4rem;
    max-width: 600px;
    margin: 0 auto;
}

/* Tool-specific Content */
.tool-content {
    padding: 2rem 0;
}

.tool-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

.tool-info h2 {
    margin-bottom: 1rem;
}

.tool-info ul {
    list-style: none;
    margin: 1.5rem 0;
}

.tool-info li {
    font-size: 1.2rem;
    margin-bottom: 0.8rem;
    padding-left: 2rem;
    position: relative;
}

.tool-info li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 8px;
    width: 16px;
    height: 16px;
    background: var(--accent-green);
    border: 2px solid var(--ink-primary);
    border-radius: 3px;
}

.tool-demo {
    position: sticky;
    top: 100px;
}

/* Technical Details */
.tech-details {
    background: white;
    border: 3px solid var(--ink-primary);
    border-radius: 15px;
    padding: 2rem;
    margin: 2rem 0;
    box-shadow: var(--shadow-hard);
}

.tech-details h3 {
    margin-bottom: 1rem;
}

.tech-details ul {
    list-style: none;
}

.tech-details li {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    padding-left: 1.5rem;
    position: relative;
}

.tech-details li::before {
    content: '>';
    position: absolute;
    left: 0;
    color: var(--accent-blue);
    font-weight: bold;
}

/* Testimonial */
.testimonial {
    background: white;
    border: 3px solid var(--ink-primary);
    border-radius: 15px;
    padding: 2rem;
    margin: 2rem 0;
    position: relative;
}

.testimonial::before {
    content: '"';
    position: absolute;
    top: -20px;
    left: 20px;
    font-size: 5rem;
    font-family: var(--font-heading);
    color: var(--accent-yellow);
    line-height: 1;
}

.testimonial p {
    font-size: 1.3rem;
    font-style: italic;
    margin-bottom: 1rem;
}

.testimonial cite {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    color: var(--ink-light);
}

/* Loading Animation */
.loading {
    display: none;
    text-align: center;
    padding: 2rem;
}

.loading.active {
    display: block;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid var(--bg-paper-dark);
    border-top: 4px solid var(--accent-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Success Message */
.success-message {
    display: none;
    text-align: center;
    padding: 2rem;
    background: var(--accent-green);
    border: 3px solid var(--ink-primary);
    border-radius: 15px;
    margin: 1rem 0;
}

.success-message.active {
    display: block;
}

.success-message h3 {
    color: var(--ink-primary);
}

/* Responsive Design */
@media (max-width: 768px) {
    html {
        font-size: 16px;
    }

    .header-content {
        flex-direction: column;
        gap: 1rem;
    }

    nav ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
    }

    h1 {
        font-size: 2.2rem;
    }

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

    .hero p {
        font-size: 1.2rem;
    }

    .drop-zone {
        padding: 2rem 1rem;
    }

    .tool-grid {
        grid-template-columns: 1fr;
    }

    .tool-demo {
        position: static;
    }

    .steps {
        flex-direction: column;
        align-items: center;
    }

    .step:not(:last-child)::after {
        display: none;
    }

    .feature-card::before {
        display: none;
    }
}

/* Utility Classes */
.text-center { text-align: center; }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }

/* Animation for wiggle effect */
@keyframes wiggle {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-3deg); }
    75% { transform: rotate(3deg); }
}

.wiggle:hover {
    animation: wiggle 0.5s ease-in-out;
}

/* Sticky note effect */
.sticky-note {
    background: var(--accent-yellow);
    padding: 1.5rem;
    border: 2px solid var(--ink-primary);
    box-shadow: 3px 3px 0px rgba(44, 62, 80, 0.3);
    transform: rotate(-1deg);
    transition: transform 0.3s ease;
}

.sticky-note:hover {
    transform: rotate(0deg) scale(1.02);
}
