/* 
    DRAFTFLOW DESIGN SYSTEM
    Dark Technical Editorial Aesthetic
*/

:root {
    /* Colors */
    --bg: #0F1117;           /* Deep dark, blue-tinted */
    --bg-secondary: #1A1D27; /* Slightly lighter dark */
    --bg-card: #1E2130;      /* Card surfaces */
    --ink: #E8E6E1;          /* Warm off-white — primary text */
    --ink-muted: #8B8FA8;    /* Secondary text, cool gray */
    --ink-faint: #3D4060;    /* Very muted, disabled */
    --accent: #00D4A1;       /* Electric teal — THE color */
    --accent-dim: rgba(0, 212, 161, 0.12); /* Teal backgrounds */
    --accent-warm: #F59E0B;   /* Amber — used sparingly */
    --border: rgba(255, 255, 255, 0.06);   /* Subtle borders */
    --border-accent: rgba(0, 212, 161, 0.25); /* Teal borders */
    
    /* Shadows */
    --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.4);
    --shadow-glow: 0 0 20px rgba(0, 212, 161, 0.15);
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg);
    color: var(--ink);
    font-family: 'Space Grotesk', sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
    
    /* Blueprint Grid Background */
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 40px 40px;
}

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

/* Typography */
h1, h2, h3, .logo {
    font-family: 'Playfair Display', serif;
}

.accent-text {
    color: var(--accent);
}

/* Navigation */
.nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(15, 17, 23, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    padding: 1rem 0;
}

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

.logo {
    font-size: 1.3rem;
    color: var(--ink);
    font-weight: 700;
}

.nav-tagline {
    font-size: 0.8rem;
    color: var(--ink-muted);
    letter-spacing: 0.05em;
}

/* Hero Section */
.hero {
    min-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    /* Dot grid background using radial-gradient */
    background-image: radial-gradient(rgba(0, 212, 161, 0.1) 1.5px, transparent 1.5px);
    background-size: 32px 32px;
}

.hero-label {
    color: var(--accent);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-weight: 500;
    margin-bottom: 1.5rem;
}

.hero-title {
    font-size: clamp(3rem, 7vw, 6rem);
    line-height: 1.05;
    margin-bottom: 2rem;
    font-weight: 800;
}

.hero-subtext {
    color: var(--ink-muted);
    max-width: 520px;
    margin: 0 auto 2.5rem;
    font-size: 1.1rem;
    line-height: 1.7;
}

.hero-badges {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 4rem;
    flex-wrap: wrap;
}

.badge {
    background: var(--accent-dim);
    color: var(--accent);
    border: 1px solid var(--border-accent);
    border-radius: 999px;
    padding: 6px 16px;
    font-size: 0.8rem;
    font-weight: 500;
}

.badge-rotated {
    transform: rotate(-2deg);
}

.hero-cta {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    color: var(--ink-muted);
}

.cta-text {
    font-size: 0.85rem;
}

.scroll-arrow {
    width: 2px;
    height: 30px;
    background: var(--accent);
    position: relative;
    animation: pulseArrow 2s infinite ease-in-out;
}

.scroll-arrow::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    border-top: 6px solid var(--accent);
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
}

@keyframes pulseArrow {
    0%, 100% { transform: translateY(0); opacity: 0.5; }
    50% { transform: translateY(10px); opacity: 1; }
}

/* App Section */
.app-section {
    background-color: var(--bg-secondary);
    border-top: 1px solid var(--border);
    padding: 5rem 0;
}

.app-grid {
    display: grid;
    grid-template-columns: 0.45fr 0.55fr;
    gap: 3rem;
    align-items: start;
}

.section-tag {
    font-size: 0.7rem;
    text-transform: uppercase;
    color: var(--accent);
    letter-spacing: 0.1em;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

/* Forms */
.form-stack {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.field-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.field-group label {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--ink-muted);
    letter-spacing: 0.08em;
}

input, textarea {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--ink);
    padding: 12px 16px;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1rem;
    transition: all 0.2s ease;
    width: 100%;
}

input::placeholder, textarea::placeholder {
    color: var(--ink-faint);
}

input:focus, textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(0, 212, 161, 0.1);
}

/* Buttons */
.btn-primary {
    background: var(--accent);
    color: #0F1117;
    border: none;
    border-radius: 8px;
    padding: 14px 28px;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    width: 100%;
    font-size: 1rem;
}

.btn-primary:hover:not(:disabled) {
    filter: brightness(1.1);
    transform: translateY(-2px);
}

.btn-primary:disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

.btn-secondary {
    background: transparent;
    color: var(--accent);
    border: 1px solid var(--border-accent);
    border-radius: 8px;
    padding: 14px 28px;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    font-size: 0.9rem;
}

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

/* Output Card Area */
.output-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: var(--shadow-card);
    min-height: 500px;
    transition: all 0.25s ease;
    padding: 2.5rem;
    position: relative;
    overflow: hidden;
}

.output-card:hover {
    border-color: var(--border-accent);
    box-shadow: var(--shadow-glow);
}

.card-dashed {
    border: 1px dashed var(--border-accent);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.empty-icon {
    font-size: 4rem;
    color: var(--accent-dim);
    margin-bottom: 1rem;
}

.empty-text {
    color: var(--ink-muted);
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.empty-subtext {
    color: var(--ink-faint);
    font-size: 0.75rem;
}

/* Proposal Content Styling */
.proposal-section {
    margin-bottom: 2.5rem;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.proposal-section.animate {
    opacity: 1;
    transform: translateY(0);
}

.section-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    color: var(--accent);
    letter-spacing: 0.1em;
    margin-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.5rem;
}

.header-marker {
    width: 4px;
    height: 4px;
    background: var(--accent);
    flex-shrink: 0;
}

.section-content {
    font-size: 1rem;
    color: var(--ink);
    line-height: 1.7;
}

.section-content p {
    margin-bottom: 1rem;
}

.section-content ul {
    list-style: none;
    margin-bottom: 1rem;
}

.section-content li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.5rem;
}

.section-content li::before {
    content: "→";
    position: absolute;
    left: 0;
    color: var(--accent);
}

/* Timeline/Milestones Styling */
.milestones-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    padding-top: 1rem;
}

.milestone-item {
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: 1rem;
    align-items: start;
}

.milestone-visual {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 24px;
}

.visual-line {
    width: 100%;
    height: 1px;
    background: var(--border-accent);
    position: relative;
}

.visual-dot {
    width: 8px;
    height: 8px;
    background: var(--accent);
    border-radius: 0; /* teal square as marker */
    position: absolute;
    left: 0;
}

.milestone-details {
    display: flex;
    flex-direction: column;
}

.milestone-label {
    font-weight: 600;
    color: var(--ink);
    margin-bottom: 0.25rem;
}

.milestone-desc {
    font-size: 0.9rem;
    color: var(--ink-muted);
}

/* Proposal Actions */
.proposal-actions {
    display: flex;
    gap: 1rem;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

.proposal-actions .btn-primary {
    flex: 2;
}

.proposal-actions .btn-secondary {
    flex: 1;
}

/* Process Section */
.process-section {
    background-color: var(--bg);
    padding: 8rem 0;
}

.process-title {
    font-size: 2.5rem;
    color: var(--ink);
    margin-bottom: 4rem;
}

.process-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.process-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 3rem 2rem;
    box-shadow: var(--shadow-card);
    transition: all 0.3s ease;
}

.process-card:hover {
    border-color: var(--border-accent);
    box-shadow: var(--shadow-glow);
    transform: translateY(-5px);
}

.step-number {
    font-family: 'Playfair Display', serif;
    font-size: 3rem;
    color: var(--accent-dim);
    line-height: 1;
    margin-bottom: 1.5rem;
}

.step-title {
    font-size: 1.25rem;
    color: var(--ink);
    margin-bottom: 1rem;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 500;
}

.step-text {
    color: var(--ink-muted);
    font-size: 0.95rem;
    line-height: 1.7;
}

/* Loading State Animation */
@keyframes textPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.generating-text {
    animation: textPulse 1.5s infinite;
}

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

.footer-grid {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--ink-muted);
    font-size: 0.85rem;
}

.footer-left {
    font-family: 'Playfair Display', serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--ink);
}

/* Utilities */
.hidden {
    display: none !important;
}

/* Reveal animation states */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Ripple Element for premium button feel */
.ripple-trigger {
    position: relative;
    overflow: hidden;
}

.ripple-element {
    position: absolute;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: scale(0);
    animation: rippleEffect 0.6s linear;
    pointer-events: none;
}

@keyframes rippleEffect {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* Animations */
.animate-fade {
    opacity: 0;
    animation: fadeIn 1s forwards;
}

.animate-fade-delay {
    opacity: 0;
    animation: fadeIn 1s 0.4s forwards;
}

.animate-fade-delay-2 {
    opacity: 0;
    animation: fadeIn 1s 0.55s forwards;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.hero-title .word {
    display: inline-block;
    opacity: 0;
    filter: blur(8px);
    animation: blurUp 0.8s forwards;
}

@keyframes blurUp {
    from { opacity: 0; filter: blur(8px); transform: translateY(10px); }
    to { opacity: 1; filter: blur(0); transform: translateY(0); }
}

/* Stagger logic for title words */
.hero-title .word:nth-child(1) { animation-delay: 0.08s; }
.hero-title .word:nth-child(2) { animation-delay: 0.16s; }
.hero-title .word:nth-child(3) { animation-delay: 0.24s; }
.hero-title .word:nth-child(4) { animation-delay: 0.32s; }
.hero-title .word:nth-child(5) { animation-delay: 0.40s; }

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 0 1.5rem;
    }

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

    .app-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

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

    .app-section, .process-section {
        padding: 4rem 0;
    }

    .footer-grid {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
    }
}
