/* ============================================================
   landing.css - Pivoteer Landing Page
   ============================================================ */

/* -- Reset -------------------------------------------------- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

/* -- Design Tokens ------------------------------------------ */
:root {
    --bg-void:    #090B10;
    --bg-forge:   #111418;
    --bg-steel:   #1C1F24;
    --bg-hover:   #24272C;
    --ember-pale: #EAB899;
    --ember-light: #D4845A;
    --ember-base: #C0622A;
    --ember-mid:  #A0501F;
    --ember-dark: #7A3D19;
    --text-primary:   #DDD8CE;
    --text-secondary: #B8B4AB;
    --text-muted:     #6B6860;
    --text-ember:     #C0622A;
    --border-subtle: #2C2F35;
    --border-ember:  rgba(192,98,42,0.30);
    --ember-bg:      rgba(192,98,42,0.12);
    --border-hover:  #3C3F45;
    --font-display: 'Manrope', sans-serif;
    --font-sans:    'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono:    'IBM Plex Mono', monospace;
    --shadow-md: 0 4px 8px rgba(0,0,0,0.3);
    --shadow-xl: 0 16px 48px rgba(0,0,0,0.5);
    --shadow-ember: 0 0 30px rgba(192,98,42,0.15);
    --section-py: 100px;
    --container-max: 1200px;
    --nav-h: 64px;
    --radius: 12px;
}

/* -- Base --------------------------------------------------- */
html { scroll-behavior: smooth; scroll-padding-top: var(--nav-h); }
body {
    font-family: var(--font-sans);
    background: var(--bg-void);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: var(--text-ember); text-decoration: none; }
a:hover { color: var(--ember-light); }
.container { max-width: var(--container-max); margin: 0 auto; padding: 0 24px; }

/* -- Typography --------------------------------------------- */
h1, h2, h3 { font-family: var(--font-display); font-weight: 800; line-height: 1.15; }
h1 { font-size: clamp(2.2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); }
h3 { font-size: 1.25rem; }
.mono { font-family: var(--font-mono); }
.text-ember { color: var(--text-ember); }

/* -- Buttons ------------------------------------------------ */
.btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 12px 28px; border-radius: 8px;
    font-family: var(--font-sans); font-weight: 600; font-size: 0.95rem;
    cursor: pointer; transition: all 0.2s ease; border: none;
    text-decoration: none;
}
.btn-primary { background: var(--ember-base); color: #fff; }
.btn-primary:hover {
    background: var(--ember-light); color: #fff;
    box-shadow: 0 0 20px rgba(192,98,42,0.3);
}
.btn-ghost {
    background: transparent; color: var(--text-primary);
    border: 1px solid var(--border-subtle);
}
.btn-ghost:hover { border-color: var(--ember-base); color: var(--text-ember); }

/* -- Badge -------------------------------------------------- */
.badge {
    display: inline-block; padding: 6px 16px;
    border-radius: 999px; font-size: 0.75rem;
    font-family: var(--font-mono); font-weight: 700;
    letter-spacing: 0.08em; text-transform: uppercase;
    background: var(--ember-bg); color: var(--ember-light);
    border: 1px solid var(--border-ember);
}

/* -- Screenshot Treatment ----------------------------------- */
.screenshot {
    border-radius: var(--radius);
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--border-subtle);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.screenshot:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl), var(--shadow-ember);
}
.screenshot-glow {
    border-color: var(--border-ember);
    box-shadow: var(--shadow-xl), var(--shadow-ember);
}

/* -- Navigation --------------------------------------------- */
.nav {
    position: fixed; top: 0; left: 0; right: 0;
    height: var(--nav-h); z-index: 100;
    background: rgba(9,11,16,0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s, box-shadow 0.3s;
}
.nav-scrolled {
    border-bottom-color: var(--border-subtle);
    box-shadow: var(--shadow-md);
}
.nav .container {
    display: flex; align-items: center; justify-content: space-between;
    height: 100%;
}
.nav-brand { display: flex; align-items: center; gap: 12px; }
.nav-brand h2 {
    font-family: var(--font-display); font-weight: 800;
    font-size: 1.35rem; color: var(--text-primary); margin: 0;
}
.nav-brand .tagline {
    font-family: var(--font-mono); font-size: 0.6rem;
    color: var(--text-muted); letter-spacing: 0.1em;
    text-transform: uppercase; display: none;
}
@media (min-width: 900px) { .nav-brand .tagline { display: inline; } }
.nav-links { display: flex; align-items: center; gap: 32px; list-style: none; }
.nav-links a { font-size: 0.9rem; color: var(--text-primary); transition: color 0.2s; }
.nav-links a:hover { color: var(--text-primary); }
.nav-links .btn { padding: 8px 20px; font-size: 0.85rem; }
.hamburger {
    display: none; background: none; border: none; cursor: pointer;
    width: 32px; height: 32px; position: relative;
}
.hamburger span {
    display: block; width: 22px; height: 2px;
    background: var(--text-primary);
    position: absolute; left: 5px; transition: all 0.3s ease;
}
.hamburger span:nth-child(1) { top: 8px; }
.hamburger span:nth-child(2) { top: 15px; }
.hamburger span:nth-child(3) { top: 22px; }
.hamburger.open span:nth-child(1) { top: 15px; transform: rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { top: 15px; transform: rotate(-45deg); }
.mobile-menu {
    display: none; position: fixed;
    top: var(--nav-h); left: 0; right: 0;
    background: var(--bg-forge);
    border-bottom: 1px solid var(--border-subtle);
    padding: 24px;
    transform: translateY(-10px); opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
    z-index: 99;
}
.mobile-menu.open { transform: translateY(0); opacity: 1; }
.mobile-menu a {
    display: block; padding: 12px 0;
    color: var(--text-secondary); font-size: 1rem;
    border-bottom: 1px solid var(--border-subtle);
}
.mobile-menu a:last-child { border-bottom: none; }
.mobile-menu .btn { margin-top: 16px; width: 100%; justify-content: center; }

/* -- Hero --------------------------------------------------- */
.hero {
    min-height: 100vh; display: flex; align-items: center;
    padding-top: calc(var(--nav-h) + 40px); padding-bottom: 60px;
}
.hero .container {
    display: grid; grid-template-columns: 1fr 1.6fr;
    gap: clamp(32px, 4vw, 60px); align-items: center;
    max-width: 1400px;
}
.hero-text { max-width: 38vw; }
.hero-text .badge { margin-bottom: 24px; }
.hero-text h1 { margin-bottom: 20px; }
.hero-text h1 .text-ember { display: inline; }
.hero-text p {
    font-size: 1.1rem; color: var(--text-secondary);
    margin-bottom: 32px; line-height: 1.7;
}
.hero-buttons { display: flex; gap: 16px; flex-wrap: wrap; }
.hero-image { position: relative; }
.hero-image .screenshot {
    width: 100%;
    border-radius: var(--radius);
}

/* -- Features ----------------------------------------------- */
/* -- Features (Gantt-style) ---------------------------------- */
.features { padding: 40px 0 0; overflow-x: hidden; }
.features .section-header { text-align: center; margin-bottom: 60px; }
.features .section-header h2 { width: fit-content; margin-left: auto; margin-right: auto; }
.features .section-header p {
    color: var(--text-secondary); font-size: 1.05rem;
    margin-top: 16px; max-width: 600px; margin-left: auto; margin-right: auto;
}

/* Gantt track container */
.gantt-track {
    position: relative;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px 100px;
}

/* Subtle vertical grid lines (Gantt time columns) */
.gantt-track::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: repeating-linear-gradient(
        90deg,
        transparent,
        transparent 199px,
        rgba(255,255,255,0.03) 199px,
        rgba(255,255,255,0.03) 200px
    );
    pointer-events: none;
    z-index: 0;
}

/* Gantt bar (feature block) */
.feature-block.gantt-bar {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 2.5fr;
    gap: 32px;
    align-items: center;
    max-width: 1100px;
    padding: 32px 36px;
    margin-bottom: 20px;
    background: var(--bg-steel);
    border: 1px solid var(--border-subtle);
    border-radius: 10px;
    box-shadow: var(--shadow-md);
    z-index: 1;
    will-change: transform, opacity;
    transition: box-shadow 0.3s ease;
}
.feature-block.gantt-bar:hover {
    box-shadow: var(--shadow-xl);
}

/* Colored left edge per bar */
.gantt-bar[data-gantt-index="0"] { border-left: 4px solid #3D8A5C; }
.gantt-bar[data-gantt-index="1"] { border-left: 4px solid #8A3030; }
.gantt-bar[data-gantt-index="2"] { border-left: 4px solid #2A5080; }
.gantt-bar[data-gantt-index="3"] { border-left: 4px solid #B8862A; }
.gantt-bar[data-gantt-index="4"] { border-left: 4px solid #3A7A6E; }
.gantt-bar[data-gantt-index="5"] { border-left: 4px solid #6B4A8A; }

.feature-content .badge { margin-bottom: 12px; }
.feature-content h3 { font-size: 1.15rem; margin-bottom: 8px; }
.feature-content p { color: var(--text-secondary); line-height: 1.5; font-size: 0.85rem; }
.feature-image .screenshot { width: 100%; border-radius: 8px; }

/* Connector arrows between bars */
.gantt-connector {
    position: relative;
    width: 100%;
    height: 60px;
    margin-bottom: 20px;
    z-index: 1;
    pointer-events: none;
}
.gantt-connector svg {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: visible;
}

/* -- Mini Gantt Subtitle ------------------------------------ */
.mini-gantt {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 48px;
}

/* Bars with text inside */
.mini-gantt-bar {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 24px 8px 12px;
    background: var(--bg-steel);
    border: 1px solid var(--border-subtle);
    border-radius: 6px;
    font-family: var(--font-sans);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    white-space: nowrap;
    width: fit-content;
}
.mini-gantt-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}
.mini-gantt-dot[data-color="0"] { background: #3D8A5C; }
.mini-gantt-dot[data-color="1"] { background: #B8862A; }
.mini-gantt-dot[data-color="2"] { background: #2A5080; }
.mini-gantt-bar[data-color="0"] { border-left: 3px solid #3D8A5C; }
.mini-gantt-bar[data-color="1"] { border-left: 3px solid #B8862A; }
.mini-gantt-bar[data-color="2"] { border-left: 3px solid #2A5080; }

/* Waterfall stagger from center */
.mini-gantt-bar[data-color="0"] { transform: translateX(-13vw); }
.mini-gantt-bar[data-color="1"] { transform: translateX(0); }
.mini-gantt-bar[data-color="2"] { transform: translateX(13vw); }

/* Connector arrow containers */
.mini-gantt-conn {
    width: 100%;
    height: 22px;
    position: relative;
    pointer-events: none;
}
.mini-gantt-conn svg {
    position: absolute;
    left: 0; top: 0;
    width: 100%;
    height: 100%;
    overflow: visible;
}

/* -- Pricing ------------------------------------------------ */
.pricing { padding: var(--section-py) 0; background: var(--bg-forge); }
.pricing .section-header { text-align: center; margin-bottom: 48px; }
.pricing .section-header p {
    color: var(--text-secondary); font-size: 1.05rem; margin-top: 16px;
}
.billing-toggle {
    display: flex; align-items: center; justify-content: center;
    gap: 12px; margin-bottom: 48px;
}
.billing-toggle span {
    font-size: 0.9rem; color: var(--text-secondary); transition: color 0.2s;
}
.billing-toggle span.active { color: var(--text-primary); font-weight: 600; }
.toggle-switch {
    width: 48px; height: 26px; border-radius: 13px;
    background: var(--bg-steel); cursor: pointer;
    position: relative; border: 1px solid var(--border-subtle);
    transition: background 0.2s;
}
.toggle-switch::after {
    content: ""; position: absolute;
    width: 20px; height: 20px; border-radius: 50%;
    background: var(--ember-base);
    top: 2px; left: 2px; transition: transform 0.2s;
}
.billing-toggle.yearly .toggle-switch::after { transform: translateX(22px); }
.billing-toggle.yearly .toggle-switch { background: var(--ember-dark); }
.save-badge {
    font-size: 0.7rem; font-family: var(--font-mono);
    color: var(--ember-light); font-weight: 700; letter-spacing: 0.05em;
}
.pricing-cards {
    display: grid; grid-template-columns: 1fr 1fr;
    gap: 32px; max-width: 800px; margin: 0 auto;
}
.pricing-card {
    background: var(--bg-steel);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius); padding: 40px 32px;
}
.pricing-card.featured {
    border-color: var(--border-ember);
    box-shadow: var(--shadow-ember); position: relative;
}
.pricing-card.featured::before {
    content: "MOST POPULAR";
    position: absolute; top: -12px; left: 50%;
    transform: translateX(-50%);
    padding: 4px 16px; border-radius: 999px;
    font-size: 0.65rem; font-family: var(--font-mono);
    font-weight: 700; letter-spacing: 0.1em;
    background: var(--ember-base); color: #fff;
}
.pricing-card h3 { margin-bottom: 8px; }
.pricing-card .price {
    font-family: var(--font-display); font-weight: 800;
    font-size: 2.5rem; margin-bottom: 4px;
}
.pricing-card .price-period {
    font-size: 0.85rem; color: var(--text-muted); margin-bottom: 24px;
}
.pricing-card .price .yearly-price,
.pricing-card .price-period .yearly-price { display: none; }
.billing-yearly .pricing-card .price .monthly-price,
.billing-yearly .pricing-card .price-period .monthly-price { display: none; }
.billing-yearly .pricing-card .price .yearly-price,
.billing-yearly .pricing-card .price-period .yearly-price { display: inline; }
.pricing-card ul { list-style: none; margin-bottom: 32px; }
.pricing-card li {
    padding: 8px 0; color: var(--text-secondary);
    font-size: 0.9rem; border-bottom: 1px solid var(--border-subtle);
}
.pricing-card li:last-child { border-bottom: none; }
.pricing-card li::before {
    content: "\2713"; margin-right: 10px;
    color: var(--ember-base); font-weight: 700;
}
.pricing-card .btn { width: 100%; justify-content: center; }

/* -- FAQ ---------------------------------------------------- */
.faq { padding: var(--section-py) 0; }
.faq .section-header { text-align: center; margin-bottom: 48px; }
.faq .section-header p {
    color: var(--text-secondary); font-size: 1.05rem; margin-top: 16px;
}
.faq-list { max-width: 760px; margin: 0 auto; }
.faq-item { border-bottom: 1px solid var(--border-subtle); }
.faq-question {
    width: 100%; background: none; border: none;
    padding: 20px 0; cursor: pointer;
    display: flex; justify-content: space-between; align-items: center;
    font-family: var(--font-sans); font-size: 1rem;
    font-weight: 600; color: var(--text-primary);
    text-align: left; transition: color 0.2s;
}
.faq-question:hover { color: var(--text-ember); }
.faq-question .icon {
    font-size: 1.2rem; color: var(--text-muted);
    transition: transform 0.3s ease;
    flex-shrink: 0; margin-left: 16px;
}
.faq-item.open .faq-question .icon { transform: rotate(45deg); }
.faq-answer { max-height: 0; overflow: hidden; transition: max-height 0.35s ease; }
.faq-answer p {
    padding: 0 0 20px; color: var(--text-secondary);
    line-height: 1.7; font-size: 0.95rem;
}

/* -- Footer ------------------------------------------------- */
.footer {
    padding: 60px 0 32px;
    background: var(--bg-forge);
    border-top: 1px solid var(--border-subtle);
}
.footer-grid {
    display: grid; grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 48px; margin-bottom: 48px;
}
.footer-brand h3 {
    font-family: var(--font-display); font-weight: 800; margin-bottom: 8px;
}
.footer-brand p { color: var(--text-muted); font-size: 0.9rem; }
.footer-col h4 {
    font-family: var(--font-mono); font-size: 0.7rem;
    letter-spacing: 0.1em; text-transform: uppercase;
    color: var(--text-muted); margin-bottom: 16px;
}
.footer-col a {
    display: block; padding: 6px 0;
    color: var(--text-secondary); font-size: 0.9rem;
}
.footer-col a:hover { color: var(--text-primary); }
.footer-bottom {
    border-top: 1px solid var(--border-subtle);
    padding-top: 24px;
    display: flex; justify-content: space-between; align-items: center;
}
.footer-bottom p { font-size: 0.8rem; color: var(--text-muted); }

/* -- Fade-up Animation -------------------------------------- */
.fade-up {
    opacity: 0.3; transform: translateY(16px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-up.visible { opacity: 1; transform: translateY(0); }

/* -- Responsive: Tablet ------------------------------------- */
@media (max-width: 1023px) {
    .hero .container { grid-template-columns: 1fr; text-align: center; max-width: var(--container-max); }
    .hero-text { max-width: 100%; }
    .hero-buttons { justify-content: center; }
    .hero-image { max-width: 600px; margin: 0 auto; }
    .feature-block.gantt-bar { grid-template-columns: 1fr 1fr; max-width: 900px; }
    .feature-content { text-align: left; }
    .pricing-cards { grid-template-columns: 1fr; max-width: 440px; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}

/* -- Responsive: Mobile ------------------------------------- */
@media (max-width: 767px) {
    :root { --section-py: 64px; }
    .nav-links { display: none; }
    .hamburger { display: block; }
    .mobile-menu { display: block; }
    .hero { min-height: auto; padding-top: calc(var(--nav-h) + 24px); padding-bottom: 40px; }
    .hero-text h1 { font-size: 1.8rem; }
    .hero-buttons { flex-direction: column; }
    .hero-buttons .btn { width: 100%; justify-content: center; }
    .hero-image { max-width: 100%; width: 100%; }
    .hero-image .screenshot { width: 100% !important; max-width: 100% !important; }
    .feature-block.gantt-bar {
        grid-template-columns: 1fr; gap: 12px;
        margin-left: 0 !important; transform: none !important;
        max-width: 100%; opacity: 1 !important;
        padding: 16px 12px;
    }
    .feature-image { order: -1; }
    .feature-image .screenshot { border-radius: 6px; }
    .gantt-connector { display: none; }
    .mini-gantt-bar { font-size: 0.75rem; padding: 6px 16px 6px 10px; }
    .mini-gantt-conn { height: 16px; }
    .gantt-track::before { display: none; }
    .feature-content h3 { font-size: 1.15rem; }
    .feature-content { text-align: center; }
    .footer-grid { grid-template-columns: 1fr; gap: 32px; }
    .footer-bottom { flex-direction: column; gap: 12px; text-align: center; }
}

/* -- Reduced Motion ----------------------------------------- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    html { scroll-behavior: auto; }
    .fade-up { opacity: 1; transform: none; }
    .feature-block.gantt-bar {
        transform: none !important;
        opacity: 1 !important;
    }
    .screenshot:hover { transform: none; }
}



/* -- Email Capture ------------------------------------------ */
.email-capture { padding: 80px 0; }
.capture-card {
    max-width: 600px; margin: 0 auto; text-align: center;
    background: var(--bg-forge); border: 1px solid var(--border-subtle);
    border-radius: var(--radius); padding: 48px 40px;
}
.capture-card h2 { margin-bottom: 12px; }
.capture-card > p { color: var(--text-secondary); font-size: 0.95rem; margin-bottom: 28px; line-height: 1.7; }
.capture-form { display: flex; gap: 12px; max-width: 440px; margin: 0 auto 16px; }
.capture-form input {
    flex: 1; padding: 12px 16px; border-radius: 8px;
    border: 1px solid var(--border-subtle); background: var(--bg-steel);
    color: var(--text-primary); font-family: var(--font-sans); font-size: 0.9rem;
    outline: none; transition: border-color 0.2s;
}
.capture-form input:focus { border-color: var(--ember-base); }
.capture-form input::placeholder { color: var(--text-muted); }
.capture-note { font-size: 0.8rem; color: var(--text-muted); }
.capture-note.success { color: #3D8A5C; }

/* -- Responsive additions ----------------------------------- */
@media (max-width: 1023px) {
}
@media (max-width: 767px) {
    .capture-form { flex-direction: column; }
    .capture-form .btn { width: 100%; justify-content: center; }
}


/* -- Pricing: 2-column comparison on mobile --------------- */
@media (max-width: 767px) {
    .pricing-cards {
        grid-template-columns: 1fr 1fr !important;
        max-width: 100% !important;
        gap: 10px;
    }
    .pricing-card {
        padding: 20px 14px;
    }
    .pricing-card {
        display: flex;
        flex-direction: column;
    }
    .pricing-card ul { flex: 1; }
    .pricing-card .btn { margin-top: auto; }
    .pricing-card h3 { font-size: 1rem; margin-bottom: 4px; }
    .pricing-card .price {
        font-size: 1.8rem;
        margin-bottom: 2px;
    }
    .pricing-card .price-period {
        font-size: 0.7rem;
        margin-bottom: 16px;
    }
    .pricing-card ul { margin-bottom: 20px; }
    .pricing-card li {
        font-size: 0.75rem;
        padding: 6px 0;
    }
    .pricing-card li::before {
        font-size: 0.7rem;
        margin-right: 6px;
    }
    .pricing-card .btn {
        padding: 10px 12px;
        font-size: 0.8rem;
    }
    .pricing-card.featured::before {
        font-size: 0.55rem;
        padding: 3px 10px;
        top: -10px;
    }
    .billing-toggle { gap: 8px; }
    .billing-toggle span { font-size: 0.8rem; }
    .save-badge { font-size: 0.6rem; }
}

/* ============================================================
   Hero Gantt Demo Animation
   ============================================================ */

/* Container */
.gantt-demo {
    background: var(--bg-forge);
    padding: 0 0 8px;
    overflow: hidden;
    position: relative;
    width: 100%;
}

/* Header row */
.gd-header {
    display: grid;
    grid-template-columns: 150px 1fr;
    border-bottom: 1px solid var(--border-subtle);
    background: var(--bg-steel);
}
.gd-task-col {
    padding: 10px 14px;
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border-right: 1px solid var(--border-subtle);
}
.gd-timeline {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    position: relative;
}
.gd-day {
    padding: 10px 0;
    text-align: center;
    font-family: var(--font-mono);
    font-size: 0.6rem;
    color: var(--text-muted);
    border-right: 1px solid rgba(255,255,255,0.04);
}
.gd-day:last-child { border-right: none; }

/* Task rows */
.gd-row {
    display: grid;
    grid-template-columns: 150px 1fr;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    opacity: 0;
    transform: translateY(8px);
}
.gantt-demo.gd-playing .gd-row {
    animation: gdRowIn 0.4s ease forwards;
    animation-delay: var(--bar-delay, 0s);
}
.gd-row:last-of-type { border-bottom: none; }

/* Task name cell */
.gd-task-name {
    padding: 12px 14px;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
    border-right: 1px solid var(--border-subtle);
    white-space: nowrap;
}
.gd-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* Timeline cell (holds bars) */
.gd-row .gd-timeline {
    position: relative;
    height: 100%;
    min-height: 36px;
}

/* Gantt bar */
.gd-bar {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    height: 20px;
    border-radius: 4px;
    background: var(--bar-color, var(--ember-base));
    opacity: 0.85;
    left: calc(var(--bar-start) * 10%);
    width: 0;
}
.gantt-demo.gd-playing .gd-bar {
    animation: gdBarGrow 0.6s ease forwards;
    animation-delay: calc(var(--bar-delay, 0s) + 0.2s);
}

/* Milestone diamond */
.gd-milestone {
    position: absolute;
    top: 50%;
    left: calc(var(--ms-pos) * 10%);
    width: 12px;
    height: 12px;
    background: var(--ember-base);
    transform: translateY(-50%) rotate(45deg) scale(0);
    border: 2px solid var(--ember-light);
}
.gantt-demo.gd-playing .gd-milestone {
    animation: gdMilestone 0.3s ease forwards;
    animation-delay: calc(var(--bar-delay, 0s) + 0.3s);
}

/* Dependency SVG overlay */
.gd-deps {
    position: absolute;
    top: 0;
    left: 150px;
    width: calc(100% - 150px);
    height: 100%;
    pointer-events: none;
    z-index: 2;
    overflow: visible;
}

/* Animated cursor (JS-driven positioning) */
.gd-cursor {
    position: absolute;
    width: 16px;
    height: 20px;
    z-index: 30;
    opacity: 0;
    pointer-events: none;
    background: none;
    top: 0;
    left: 0;
}
/* Pointer shape (default) */
.gd-cursor::before {
    content: "";
    position: absolute;
    top: 0; left: 0;
    width: 0; height: 0;
    border-left: 7px solid var(--text-primary);
    border-top: 0px solid transparent;
    border-bottom: 10px solid transparent;
    border-right: 5px solid transparent;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.5));
    transition: opacity 0.15s;
}
/* Resize shape (ew-resize double arrow) */
.gd-cursor--resize::before {
    border: none;
    width: 14px;
    height: 14px;
    top: 3px;
    left: 1px;
    background: none;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.5));
    /* Draw ↔ shape via borders + clip */
    border-left: 4px solid var(--text-primary);
    border-right: 4px solid var(--text-primary);
    border-top: 3px solid transparent;
    border-bottom: 3px solid transparent;
}
/* Click ring effect */
.gd-click-ring {
    position: absolute;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid var(--ember-base);
    pointer-events: none;
    z-index: 29;
    animation: gdClickRing 0.4s ease-out forwards;
    transform: translate(-50%, -50%);
}
@keyframes gdClickRing {
    0%   { transform: translate(-50%, -50%) scale(0.3); opacity: 1; }
    100% { transform: translate(-50%, -50%) scale(1.5); opacity: 0; }
}

/* Row use --bar-delay from first child for stagger */
.gd-row[data-row="0"] { --bar-delay: 0.3s; }
.gd-row[data-row="1"] { --bar-delay: 0.6s; }
.gd-row[data-row="2"] { --bar-delay: 0.9s; }
.gd-row[data-row="3"] { --bar-delay: 1.2s; }
.gd-row[data-row="4"] { --bar-delay: 1.5s; }
.gd-row[data-row="5"] { --bar-delay: 1.8s; }
.gd-row[data-row="6"] { --bar-delay: 2.1s; }
.gd-row[data-row="7"] { --bar-delay: 2.4s; }
.gd-row[data-row="8"] { --bar-delay: 2.7s; }
.gd-row[data-row="9"] { --bar-delay: 3.0s; }

/* Keyframes */
@keyframes gdRowIn {
    to { opacity: 1; transform: translateY(0); }
}
@keyframes gdBarGrow {
    to { width: calc(var(--bar-span) * 10%); }
}
@keyframes gdMilestone {
    to { transform: translateY(-50%) rotate(45deg) scale(1); }
}
/* Frozen state: after initial animation, bars become JS-controlled with transitions */
.gd-bar.gd-frozen {
    animation: none !important;
    width: calc(var(--bar-span) * 10%) !important;
    transition: width 0.4s ease, left 0.4s ease;
}
.gd-milestone.gd-frozen {
    animation: none !important;
    transform: translateY(-50%) rotate(45deg) scale(1) !important;
    transition: left 0.4s ease;
}
/* ── Mini Modal (edit task overlay) ── */
.gd-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 20;
    opacity: 0;
    transition: opacity 0.2s ease;
}
.gd-modal-backdrop.gd-modal-visible {
    opacity: 1;
}
.gd-modal {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -55%);
    width: 240px;
    background: #111418;
    border: 1px solid #2C2F35;
    border-radius: 10px;
    z-index: 21;
    box-shadow: 0 16px 48px rgba(0,0,0,0.5);
    opacity: 0;
    transition: opacity 0.25s ease, transform 0.25s ease;
}
.gd-modal.gd-modal-visible {
    opacity: 1;
    transform: translate(-50%, -50%);
}
/* Header */
.gd-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px 8px;
    border-bottom: 1px solid #2C2F35;
}
.gd-modal-title {
    font-family: var(--font-display);
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--text-primary);
}
.gd-modal-close {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    color: var(--text-muted);
    cursor: default;
    border-radius: 4px;
}
/* Body */
.gd-modal-body {
    padding: 12px 14px;
}
.gd-modal-field {
    margin-bottom: 10px;
}
.gd-modal-field:last-child {
    margin-bottom: 0;
}
.gd-modal-label {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.5rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 4px;
}
.gd-modal-input {
    width: 100%;
    padding: 6px 8px;
    background: #1C1F24;
    border: 1px solid #2C2F35;
    border-radius: 6px;
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 0.7rem;
    outline: none;
}
.gd-modal-input.gd-readonly {
    color: var(--text-muted);
    background: #15181C;
}
.gd-modal-input.gd-editing {
    border-color: var(--ember-base);
    box-shadow: 0 0 0 1px rgba(192,98,42,0.3);
}
/* Footer */
.gd-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 8px 14px 12px;
    border-top: 1px solid #2C2F35;
}
.gd-modal-btn {
    padding: 5px 14px;
    border-radius: 6px;
    font-family: var(--font-sans);
    font-size: 0.6rem;
    font-weight: 600;
    cursor: default;
    border: none;
}
.gd-modal-btn-cancel {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid #2C2F35;
}
.gd-modal-btn-save {
    background: var(--ember-base);
    color: #fff;
}
.gd-modal-btn-save.gd-btn-hover {
    background: var(--ember-light);
    box-shadow: 0 0 12px rgba(192,98,42,0.3);
}

/* Instant dependency lines (no draw animation) */
.gd-dep-instant {
    stroke-dasharray: none;
    stroke-dashoffset: 0;
    opacity: 1;
}

/* Dependency line draw animation */
.gd-dep-line {
    stroke-dasharray: 200;
    stroke-dashoffset: 200;
}
.gantt-demo.gd-playing .gd-dep-line {
    animation: gdDepDraw 0.5s ease forwards;
}
/* Arrowhead: hidden until line finishes, then fades in */
.gd-dep-arrow {
    opacity: 0;
}
.gantt-demo.gd-playing .gd-dep-arrow {
    animation: gdArrowIn 0.15s ease forwards;
}

@keyframes gdDepDraw {
    to { stroke-dashoffset: 0; }
}
@keyframes gdArrowIn {
    to { opacity: 1; }
}

/* Fade-out before loop reset */
.gantt-demo.gd-fading {
    animation: gdFadeOut 0.6s ease forwards;
}
@keyframes gdFadeOut {
    to { opacity: 0.3; }
}
.gantt-demo.gd-fadein {
    animation: gdFadeIn 0.4s ease forwards;
}
@keyframes gdFadeIn {
    from { opacity: 0.3; }
    to { opacity: 1; }
}

/* Responsive: mobile gantt demo */
@media (max-width: 767px) {
    .gantt-demo {
        aspect-ratio: auto;
        padding: 0 0 2px;
        border-radius: 6px;
        max-width: 100%;
    }
    .gd-header { grid-template-columns: 72px 1fr; }
    .gd-header .gd-task-col { padding: 3px 4px; font-size: 0.45rem; letter-spacing: 0; }
    .gd-timeline { grid-template-columns: repeat(7, 1fr); }
    .gd-day { font-size: 0.45rem; padding: 4px 0; }
    /* Hide last 3 day columns (Wed/Thu/Fri of week 2) → 7-day view */
    .gd-day:nth-child(n+8) { display: none; }
    .gd-row { grid-template-columns: 72px 1fr; }
    .gd-row .gd-timeline { min-height: 22px; }
    .gd-task-name {
        padding: 3px 4px; font-size: 0.55rem; gap: 3px;
        line-height: 1.15;
        white-space: normal;
    }
    .gd-dot { width: 4px; height: 4px; }
    /* 7-column positioning instead of 10 */
    .gd-bar {
        height: 12px; border-radius: 3px;
        left: calc(var(--bar-start) * 100% / 7) !important;
    }
    .gd-bar.gd-frozen {
        width: calc(var(--bar-span) * 100% / 7) !important;
    }
    .gd-milestone {
        width: 9px; height: 9px;
        left: calc(var(--ms-pos) * 100% / 7) !important;
    }
    .gd-deps { left: 72px; }
    .gd-dep-line, .gd-dep-arrow, .gd-dep-instant { stroke-width: 1 !important; }
    /* Hide cursor and modal on mobile — no interactive animation */
    .gd-cursor { display: none !important; }
    .gd-modal-backdrop { display: none !important; }
    /* Bar grow animation target for 7 columns */
    .gantt-demo.gd-playing .gd-bar {
        animation-name: gdBarGrow7;
    }
}
@keyframes gdBarGrow7 {
    from { width: 0; }
    to { width: calc(var(--bar-span) * 100% / 7); }
}

/* Override screenshot hover for gantt-demo */
.gantt-demo.screenshot:hover {
    transform: none;
}