/* ── Index page ── */

/* Demo Container */
.demo-container {
    margin-top: 2rem;
    width: 100%;
    max-width: 48rem;
    position: relative;
}

.demo-glow {
    position: absolute;
    inset: 0;
    background-color: rgba(29, 161, 242, 0.05);
    filter: blur(100px);
    z-index: -10;
}

.demo-window {
    --demo-outer-radius: 20px;
    --demo-frame-inset: 7px;
    border-radius: var(--demo-outer-radius);
    border: 1px solid rgba(255, 255, 255, 0.1);
    background-color: #000;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    padding: var(--demo-frame-inset);
    background-clip: padding-box;
}

.demo-content {
    border-radius: calc(var(--demo-outer-radius) - var(--demo-frame-inset));
    border: 1px solid rgba(255, 255, 255, 0.05);
    background-color: #050505;
    padding: 1.5rem;
    overflow: hidden;
    background-clip: padding-box;
}

@media (min-width: 768px) {
    .demo-content {
        padding: 2.5rem;
    }
}

/* Trusted By */
.trusted-by {
    margin-top: 5rem;
    padding-top: 2.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.trusted-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--color-text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.2em;
}

.avatars {
    display: flex;
    margin-left: 0.75rem;
    opacity: 0.4;
    transition: opacity 0.5s;
}

.avatars:hover {
    opacity: 1;
}

.avatar {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    border: 2px solid #000;
    background-color: var(--color-surface-dark);
    margin-left: -0.75rem;
    overflow: hidden;
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Features Section */
.features-section {
    width: 100%;
    padding: 8rem 0;
    background-color: var(--color-background-dark);
}

/* Bento Grid */
.bento-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .bento-grid {
        grid-template-columns: repeat(12, 1fr);
    }
}

.bento-card {
    position: relative;
    border-radius: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background-color: var(--color-surface-card);
    overflow: hidden;
    padding: 2.5rem;
}

.bento-card:hover {
    border-color: rgba(255, 255, 255, 0.2);
}

.span-8 {
    grid-column: span 1;
}

.span-4 {
    grid-column: span 1;
}

.span-6 {
    grid-column: span 1;
}

@media (min-width: 768px) {
    .span-8 {
        grid-column: span 8;
    }

    .span-4 {
        grid-column: span 4;
    }

    .span-6 {
        grid-column: span 6;
    }
}

/* Feature Card Content */
.feature-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.feature-text {
    color: var(--color-text-secondary);
    line-height: 1.625;
}

.feature-row {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

@media (min-width: 1024px) {
    .feature-row {
        flex-direction: row;
    }
}

.feature-content {
    flex: 1;
}

.feature-graphic {
    flex: 1;
    height: 16rem;
    background-color: black;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.75rem;
    padding: 1rem;
    overflow: hidden;
}

@media (min-width: 1024px) {
    .feature-graphic {
        height: auto;
    }
}

/* Style Pills */
.style-pill-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1.5rem;
}

.style-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.85rem;
    border-radius: 9999px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background-color: rgba(255, 255, 255, 0.04);
    transition: border-color 0.2s, background-color 0.2s;
}

.style-pill:hover {
    border-color: rgba(29, 161, 242, 0.3);
    background-color: rgba(29, 161, 242, 0.08);
}

.style-pill-dot {
    width: 0.375rem;
    height: 0.375rem;
    border-radius: 50%;
    background-color: var(--color-primary);
}

.style-pill-label {
    font-size: 0.8rem;
    font-weight: 500;
    color: #E5E7EB;
}

/* Workflow Section */
.workflow-section {
    width: 100%;
    padding: 8rem 0;
    background-color: var(--color-background-dark);
}

.timeline {
    position: relative;
}

.timeline::before {
    content: '';
    position: absolute;
    inset: 0;
    left: 19px;
    width: 1px;
    background-color: rgba(255, 255, 255, 0.1);
}

@media (min-width: 768px) {
    .timeline::before {
        left: 50%;
    }
}

.timeline-item {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 3rem;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

@media (min-width: 768px) {
    .timeline-item {
        justify-content: normal;
    }

    .timeline-item:nth-child(odd) {
        flex-direction: row-reverse;
    }
}

.timeline-marker {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background-color: black;
    color: var(--color-primary);
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    z-index: 10;
    flex-shrink: 0;
}

.timeline-marker span {
    font-size: 0.75rem;
    font-weight: 700;
}

@media (min-width: 768px) {
    .timeline-marker {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
    }
}

.timeline-content {
    width: calc(100% - 3rem);
    padding: 2rem;
    border-radius: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
    background-color: var(--color-surface-card);
}

@media (min-width: 768px) {
    .timeline-content {
        width: calc(50% - 2.5rem);
    }
}

.step-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.step-desc {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
    line-height: 1.625;
    text-align: left;
}

.btn-step {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1.25rem;
    padding: 0.6rem 1.25rem;
    border-radius: 9999px;
    border: none;
    background-color: white;
    color: black;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s;
}

.btn-step:hover {
    opacity: 0.85;
}

/* Compare Section */
.compare-section {
    width: 100%;
    padding: 8rem 0;
    background-color: var(--color-background-dark);
}

.compare-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    max-width: 1000px;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .compare-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.compare-card {
    padding: 2.5rem 2rem;
    border-radius: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
    background-color: var(--color-surface-card);
    transition: border-color 0.2s;
}

.compare-card:hover {
    border-color: rgba(255, 255, 255, 0.2);
}

.compare-label {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: white;
}

.compare-label-active {
    color: var(--color-primary);
}

.compare-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.compare-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.925rem;
    color: var(--color-text-secondary);
    line-height: 1.5;
}

.compare-icon-x {
    flex-shrink: 0;
    color: white;
}

.compare-icon-check {
    flex-shrink: 0;
    color: var(--color-primary);
}

/* Try Demo Label */
.try-demo-label {
    margin-top: 7rem;
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    color: var(--color-primary);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.try-demo-label::before {
    content: '';
    display: inline-block;
    width: 20px;
    height: 1px;
    background: var(--color-primary);
    opacity: 0.5;
}

.try-demo-label::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 1px;
    background: var(--color-primary);
    opacity: 0.5;
}

/* Mock UI Components */
.mock-ui-header {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    margin-bottom: 2rem;
}

.mock-ui-dot {
    width: 0.75rem;
    height: 0.75rem;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
}

.mock-ui-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 2.5rem;
}

.mock-ui-avatar {
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.05);
    flex-shrink: 0;
}

.mock-ui-text-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.mock-ui-bar {
    height: 0.625rem;
    border-radius: 9999px;
    background-color: rgba(255, 255, 255, 0.05);
}

.mock-ui-bar.subtle {
    background-color: rgba(255, 255, 255, 0.1);
}

.mock-ui-bar.w-25 {
    width: 25%;
}

.mock-ui-bar.w-80 {
    width: 80%;
}

.mock-ui-bar.w-83 {
    width: 83%;
}

.mock-ui-bar.w-66 {
    width: 66%;
}

.mock-ui-bar.w-100 {
    width: 100%;
}

.mock-ui-connector {
    margin-left: 1.5rem;
    width: 1px;
    height: 2.5rem;
    background-color: rgba(255, 255, 255, 0.1);
    margin-bottom: 0.5rem;
}

.mock-ui-reply-wrapper {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.mock-ui-reply-icon {
    margin-top: 0.5rem;
    flex-shrink: 0;
}

.mock-ui-reply-box {
    flex: 1;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.75rem;
    background-color: rgba(255, 255, 255, 0.02);
    padding: 1.5rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.mock-ui-reply-text-stack {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.mock-ui-pills {
    display: flex;
    gap: 0.5rem;
}

.mock-ui-pill {
    padding: 0.375rem 0.75rem;
    border-radius: 0.25rem;
    background-color: rgba(255, 255, 255, 0.05);
}

.mock-ui-pill-text {
    font-size: 10px;
    font-weight: 700;
    color: #A1A1AA;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

/* Draft Demo */
.demo-draft {
    background-color: rgba(0, 0, 0, 0.9);
    border-radius: calc(var(--demo-outer-radius) - var(--demo-frame-inset));
    padding: 1.75rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 30px 50px -30px rgba(0, 0, 0, 0.7);
}

.draft-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    color: #9CA3AF;
    font-weight: 600;
    font-size: 0.9rem;
}

.draft-close {
    font-size: 1.25rem;
    line-height: 1;
    color: #6B7280;
}

.draft-title {
    color: #38BDF8;
    font-weight: 600;
    letter-spacing: 0.01em;
}

.draft-tweet {
    display: flex;
    gap: 1rem;
    color: #E5E7EB;
}

.draft-avatar {
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
}

.draft-avatar.small {
    width: 2.25rem;
    height: 2.25rem;
}

.draft-tweet-body {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.draft-name-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    align-items: center;
    font-size: 0.95rem;
    text-align: left;
}

.draft-name {
    font-weight: 700;
    color: #F9FAFB;
}

.draft-handle,
.draft-time {
    color: #9CA3AF;
    font-weight: 500;
}

.draft-text {
    margin: 0;
    color: #E5E7EB;
    font-size: 0.95rem;
    line-height: 1.55;
    text-align: left;
}

.draft-list {
    margin: 0;
    padding-left: 1.2rem;
    color: #E5E7EB;
    font-size: 0.95rem;
    line-height: 1.55;
    text-align: left;
}

.draft-replying {
    color: #9CA3AF;
    font-size: 0.85rem;
    text-align: left;
}

.draft-replying span {
    color: #38BDF8;
}

.draft-divider {
    height: 1px;
    background-color: rgba(255, 255, 255, 0.08);
    margin: 1.5rem 0 1.2rem;
}

.draft-reply-area {
    display: flex;
    gap: 1rem;
}

.draft-reply-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.draft-reply-placeholder {
    font-size: 0.95rem;
    color: #6B7280;
    text-align: left;
}

.draft-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.draft-chip {
    padding: 0.4rem 0.85rem;
    border-radius: 999px;
    border: 1px solid rgba(56, 189, 248, 0.6);
    color: #7DD3FC;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s;
}

.draft-chip:hover {
    background-color: rgba(56, 189, 248, 0.15);
}

.draft-chip.active {
    background-color: rgba(56, 189, 248, 0.25);
    border-color: #38BDF8;
    color: #FFFFFF;
}

.draft-reply-active {
    color: #E5E7EB !important;
    font-size: 0.95rem;
    line-height: 1.55;
    text-align: left;
}

.draft-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 1rem;
}

.draft-button {
    background-color: rgba(255, 255, 255, 0.85);
    color: #111827;
    border: none;
    border-radius: 999px;
    padding: 0.45rem 1.2rem;
    font-weight: 600;
    font-size: 0.85rem;
    transition: opacity 0.2s;
}

.draft-button.disabled {
    background-color: rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.3);
    cursor: default;
}

@media (max-width: 640px) {
    .demo-draft {
        padding: 1.25rem;
    }

    .draft-actions {
        justify-content: flex-end;
    }
}

/* Feature Graphic */
.graphic-stack {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.graphic-line {
    height: 0.5rem;
    border-radius: 9999px;
    background-color: rgba(255, 255, 255, 0.1);
}

.graphic-line.w-50 {
    width: 50%;
}

.graphic-line.w-33 {
    width: 33%;
}

.graphic-line.w-66 {
    width: 66%;
}

.graphic-box {
    padding: 1rem;
    border: 1px solid rgba(29, 161, 242, 0.2);
    background-color: rgba(29, 161, 242, 0.05);
    border-radius: 0.5rem;
}

.graphic-box-line {
    height: 0.5rem;
    background-color: rgba(29, 161, 242, 0.3);
    border-radius: 9999px;
    margin-bottom: 0.5rem;
}

.graphic-box-line.w-100 {
    width: 100%;
}

.graphic-box-line.w-75 {
    width: 75%;
}

/* Workflow Grid */
.workflow-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    position: relative;
}

@media (min-width: 768px) {
    .workflow-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .workflow-grid::before {
        content: '';
        position: absolute;
        top: 5.25rem;
        left: calc(16.66% + 1.5rem);
        right: calc(16.66% + 1.5rem);
        height: 1px;
        background: linear-gradient(90deg, rgba(29, 161, 242, 0.4), rgba(29, 161, 242, 0.15), rgba(29, 161, 242, 0.4));
        z-index: 0;
    }
}

.workflow-card {
    padding: 2.5rem 2rem;
    border-radius: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
    background-color: var(--color-surface-card);
    transition: border-color 0.2s;
    position: relative;
    z-index: 1;
}

.workflow-card:hover {
    border-color: rgba(255, 255, 255, 0.2);
}

.workflow-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3.5rem;
    height: 3.5rem;
    margin: 0 0 1.25rem;
    border-radius: 50%;
    border: 1px solid rgba(29, 161, 242, 0.3);
    background-color: rgba(29, 161, 242, 0.08);
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--color-primary);
}

/* Demo Popup Modal */
.demo-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.4s;
    padding: 1rem;
}

.demo-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.demo-modal {
    position: relative;
    overflow: hidden;
    background: var(--color-surface-card);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1.25rem;
    padding: 3rem 2.5rem;
    max-width: 26rem;
    width: 100%;
    text-align: center;
    transform: scale(0.9) translateY(24px);
    opacity: 0;
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.demo-modal-overlay.active .demo-modal {
    transform: scale(1) translateY(0);
    opacity: 1;
}

.demo-modal-glow {
    position: absolute;
    top: -60px;
    left: 50%;
    transform: translateX(-50%);
    width: 300px;
    height: 200px;
    background: radial-gradient(circle, rgba(29, 161, 242, 0.15) 0%, transparent 70%);
    pointer-events: none;
    filter: blur(40px);
}

.demo-modal-icon-box {
    width: 3.5rem;
    height: 3.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 1rem;
    background: rgba(29, 161, 242, 0.1);
    border: 1px solid rgba(29, 161, 242, 0.2);
    color: var(--color-primary);
    margin: 0 auto 1.5rem;
}

.demo-modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    letter-spacing: -0.025em;
}

.demo-modal-desc {
    color: var(--color-text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 2rem;
    font-weight: 300;
}

.demo-modal-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    height: 3.5rem;
    padding: 0 2rem;
    border-radius: 9999px;
    background-color: var(--color-primary);
    color: white;
    font-weight: 700;
    font-size: 0.875rem;
    min-width: 200px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    box-shadow: 0 10px 15px -3px rgba(29, 161, 242, 0.2);
    transition: all 0.2s;
}

.demo-modal-cta:hover {
    background-color: var(--color-primary-hover);
}

.demo-modal-close {
    display: block;
    margin: 1.25rem auto 0;
    color: var(--color-text-tertiary);
    font-size: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    background: none;
    border: none;
    font-family: inherit;
    transition: color 0.2s;
}

.demo-modal-close:hover {
    color: var(--color-text-secondary);
}

/* Stats Section */
.stats-section {
    width: 100%;
    padding: 8rem 0;
    background-color: var(--color-background-dark);
}

.stats-section .container {
    max-width: 1000px;
}

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

.stats-grid + .stats-grid {
    margin-top: 1rem;
}

@media (min-width: 640px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.stat-card {
    position: relative;
    border-radius: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background-color: var(--color-surface-card);
    overflow: hidden;
    padding: 2.5rem 2rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    transition: border-color 300ms;
}

.stat-card:hover {
    border-color: rgba(255, 255, 255, 0.2);
}

.stat-number {
    font-size: 2.75rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.1;
    color: var(--color-text-main);
}

.stat-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-text-secondary);
    letter-spacing: 0.01em;
}
