/* Homepage Specific Styles */

body {
    display: block;
}

.container {
    max-width: 1340px;
    padding: 2rem;
    position: relative;
    z-index: 2;
}

.hero {
    min-height: calc(100vh - 4rem);
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 0.94fr) minmax(340px, 0.66fr);
    gap: 4.5rem;
    align-items: center;
    justify-content: center;
}

.hero::before {
    content: "";
    position: absolute;
    inset: 14% 8% auto;
    height: 420px;
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.22), rgba(236, 72, 153, 0.10));
    filter: blur(70px);
    opacity: 0.7;
    pointer-events: none;
    z-index: -2;
}

.hero::after {
    content: "";
    position: absolute;
    inset: 4rem 1rem 0;
    pointer-events: none;
    z-index: -1;
    opacity: 0.5;
    background-image:
        linear-gradient(rgba(216, 197, 255, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(216, 197, 255, 0.08) 1px, transparent 1px);
    background-size: 42px 42px;
    mask-image: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.72), transparent 72%);
}

.hero-copy {
    max-width: 680px;
}

.hero-eyebrow,
.section-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #d8c5ff;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 1.2rem;
}

.hero-eyebrow::before,
.section-kicker::before {
    content: "";
    width: 1.25rem;
    height: 1px;
    background: linear-gradient(90deg, #a855f7, #ec4899);
}

.tagline {
    font-size: clamp(2rem, 5vw, 4rem);
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 1.5rem;
    line-height: 1.04;
    animation: fadeInUp 1s ease-out 0.2s both;
}

.hero-description {
    max-width: 620px;
    color: var(--muted);
    font-size: 1.1rem;
    line-height: 1.75;
    margin-bottom: 2.9rem;
    animation: fadeInUp 1s ease-out 0.3s both;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.9rem;
    margin-top: 0;
    margin-bottom: 2rem;
    animation: fadeInUp 1s ease-out 0.4s both;
}

.primary-action,
.secondary-action {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    min-height: 54px;
    padding: 0.95rem 1.55rem;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1rem;
    overflow: hidden;
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease, box-shadow 0.25s ease, background-position 0.35s ease;
}

.primary-action svg,
.secondary-action svg {
    width: 1.1rem;
    height: 1.1rem;
    flex: 0 0 auto;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.primary-action {
    color: #ffffff;
    background: linear-gradient(135deg, #a855f7 0%, #ec4899 48%, #7c3aed 100%);
    background-size: 190% 190%;
    box-shadow: 0 18px 52px rgba(168, 85, 247, 0.28);
}

.primary-action::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, transparent 8%, rgba(255, 255, 255, 0.2) 46%, transparent 70%);
    transform: translateX(-120%);
    transition: transform 0.45s ease;
}

.secondary-action {
    color: #efe9ff;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--line-strong);
    backdrop-filter: blur(12px);
}

.primary-action:hover,
.secondary-action:hover {
    transform: translateY(-2px);
}

.primary-action:hover {
    transform: translateY(-3px);
    background-position: 100% 50%;
    box-shadow: 0 22px 70px rgba(168, 85, 247, 0.42), 0 0 34px rgba(236, 72, 153, 0.25);
}

.primary-action:hover::before {
    transform: translateX(120%);
}

.primary-action span,
.primary-action svg {
    position: relative;
    z-index: 1;
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    animation: fadeInUp 1s ease-out 0.5s both;
}

.hero-stats div {
    min-width: 0;
    padding: 0.15rem 1.25rem;
    text-align: left;
    border-right: 1px solid rgba(196, 160, 255, 0.18);
}

.hero-stats div:last-child {
    border-right: none;
}

.hero-stats strong {
    display: block;
    color: #ffffff;
    font-size: 1.25rem;
    margin-bottom: 0.3rem;
}

.hero-stats span {
    color: var(--subtle);
    font-size: 0.82rem;
}

.hero-preview-column {
    display: flex;
    flex-direction: column;
    gap: 3.5rem;
}

.api-preview {
    position: relative;
    padding: 1rem;
    border-radius: 18px;
    background:
        linear-gradient(135deg, rgba(168, 85, 247, 0.16), rgba(236, 72, 153, 0.06)),
        rgba(12, 7, 24, 0.68);
    border: 1px solid rgba(206, 174, 255, 0.18);
    box-shadow: 0 30px 90px rgba(7, 5, 17, 0.42), 0 0 80px rgba(124, 58, 237, 0.16);
    backdrop-filter: blur(22px);
    animation: fadeInUp 1s ease-out 0.55s both;
    cursor: pointer;
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.api-preview:hover,
.api-preview:focus-visible {
    transform: translateY(-4px);
    border-color: rgba(216, 197, 255, 0.34);
    box-shadow: 0 34px 100px rgba(7, 5, 17, 0.5), 0 0 110px rgba(168, 85, 247, 0.24);
    outline: none;
}

.api-preview::after {
    content: "";
    position: absolute;
    inset: 1px;
    border-radius: 17px;
    pointer-events: none;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.api-preview-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0.6rem 0.9rem;
    color: var(--muted);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.78rem;
}

.api-preview-header p {
    margin: 0;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.api-preview-controls {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-left: auto;
    flex: 0 0 auto;
}

.window-control {
    position: relative;
    width: 1.18rem;
    height: 1.18rem;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.window-control::before,
.window-control::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    background: rgba(232, 221, 255, 0.72);
    transform: translate(-50%, -50%);
}

.window-control.minimize::before {
    width: 0.45rem;
    height: 2px;
}

.window-control.maximize::before {
    width: 0.28rem;
    height: 0.28rem;
    background: transparent;
    border: 2px solid rgba(232, 221, 255, 0.72);
}

.window-control.close::before,
.window-control.close::after {
    width: 0.56rem;
    height: 2px;
    background: rgba(232, 221, 255, 0.72);
}

.window-control.close::before {
    transform: translate(-50%, -50%) rotate(45deg);
}

.window-control.close::after {
    transform: translate(-50%, -50%) rotate(-45deg);
}

.api-preview pre {
    overflow-x: auto;
    padding: 1.25rem;
    border-radius: 12px;
    background: rgba(5, 3, 12, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.api-preview code {
    color: #e8ddff;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.82rem;
    line-height: 1.75;
}

.home-section {
    max-width: 1340px;
    margin: 0 auto;
    padding: 6rem 2rem 1rem;
    position: relative;
    z-index: 2;
}

.section-header {
    max-width: 760px;
    margin-bottom: 2.5rem;
}

.section-header h2,
.split-section h2 {
    font-size: clamp(1.8rem, 4vw, 3rem);
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 1rem;
    line-height: 1.08;
}

.section-header p,
.split-section p {
    color: var(--muted);
    font-size: 1.05rem;
    line-height: 1.7;
}

.use-case-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.use-case-card {
    min-height: 240px;
    padding: 2rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: 0 20px 70px rgba(7, 5, 17, 0.18);
    backdrop-filter: blur(18px);
    transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.use-case-icon,
.workflow-icon {
    width: 2.25rem;
    height: 2.25rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.2rem;
    color: #d8c5ff;
    background: rgba(168, 85, 247, 0.12);
    border: 1px solid var(--line-strong);
    border-radius: 10px;
}

.use-case-icon svg,
.workflow-icon svg {
    width: 1.15rem;
    height: 1.15rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.use-case-card:hover {
    transform: translateY(-4px);
    border-color: var(--line-strong);
    background: var(--surface-strong);
}

.use-case-kicker {
    color: #ec4899;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.use-case-card h3 {
    font-size: 1.25rem;
    color: #ffffff;
    margin-bottom: 1rem;
}

.use-case-card p {
    color: var(--muted);
    line-height: 1.6;
    font-size: 0.95rem;
}

.split-section {
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
    gap: 3rem;
    align-items: center;
    padding-bottom: 3rem;
}

.endpoint-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

.endpoint-list span {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.9rem 1rem;
    color: #e5e7eb;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--line);
    border-radius: 8px;
    font-size: 0.9rem;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.endpoint-list span::before {
    content: "✓";
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.15rem;
    height: 1.15rem;
    flex: 0 0 auto;
    color: #ffffff;
    background: linear-gradient(135deg, #a855f7 0%, #ec4899 100%);
    border-radius: 50%;
    font-size: 0.7rem;
    font-weight: 800;
}

.workflow-section {
    padding-top: 4rem;
}

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

.workflow-step {
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.02));
}

.workflow-step h3 {
    margin: 0 0 0.7rem;
    color: #ffffff;
    font-size: 1.15rem;
}

.workflow-step p {
    color: var(--muted);
    line-height: 1.6;
    font-size: 0.92rem;
}

/* Terminal */
.terminal {
    position: fixed;
    display: none;
    top: 1.5rem;
    left: 1.5rem;
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    font-size: 1rem;
    font-weight: 500;
    color: #ffffff;
    background: rgba(16, 8, 31, 0.62);
    padding: 0.75rem 1.25rem;
    border-radius: 12px;
    border: 1px solid var(--line);
    backdrop-filter: blur(18px);
    z-index: 10;
    opacity: 0;
    transform: scale(0.985);
    transition: opacity 0.08s ease, transform 0.08s ease;
    cursor: pointer;
}

.terminal:hover {
    background: rgba(31, 18, 54, 0.72);
    border-color: var(--line-strong);
}

.terminal.maximized {
    display: block;
    position: fixed;
    top: 2rem;
    left: 2rem;
    right: 2rem;
    bottom: 2rem;
    width: auto;
    height: auto;
    border-radius: 16px;
    padding: 1.5rem;
    background: rgba(8, 5, 18, 0.94);
    border: 1px solid var(--line-strong);
    z-index: 100;
    overflow-y: auto;
    opacity: 1;
    transform: scale(1);
}

.terminal-header {
    display: none;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--line);
}

.terminal.maximized .terminal-header {
    display: flex;
}

.terminal-title {
    font-size: 0.9rem;
    color: var(--muted);
}

.terminal-close {
    background: rgba(168, 85, 247, 0.16);
    border: 1px solid var(--line-strong);
    color: var(--text);
    padding: 0.25rem 0.75rem;
    border-radius: 6px;
    cursor: pointer;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    transition: all 0.2s ease;
}

.terminal-close:hover {
    background: rgba(168, 85, 247, 0.24);
}

.terminal-content {
    line-height: 1.6;
}

.terminal.maximized .terminal-content {
    max-height: calc(100vh - 12rem);
    overflow-y: auto;
}

.terminal-input-line {
    display: none;
    margin-top: 1rem;
}

.terminal.maximized .terminal-input-line {
    display: flex;
    align-items: center;
}

.terminal-input {
    background: transparent;
    border: none;
    outline: none;
    color: #ffffff;
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    font-size: 1rem;
    flex: 1;
    margin-left: 0.5rem;
}

.terminal-history {
    display: none;
}

.terminal.maximized .terminal-history {
    display: block;
}

.terminal-prompt {
    display: block;
}

.terminal.maximized .terminal-prompt {
    display: none;
}

.terminal .prompt {
    color: #a855f7;
}

.terminal .server {
    background: linear-gradient(135deg, #a855f7 0%, #ec4899 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.cursor {
    animation: blink 1s infinite;
}

/* Mobile Overrides for Homepage */
@media (max-width: 768px) {
    body {
        padding-top: 5rem;
    }
    
    .container {
        padding: 1rem;
    }
    
    .terminal {
        top: 1.5rem;
    }

    .hero {
        grid-template-columns: 1fr;
        gap: 2.5rem;
        min-height: auto;
        padding-top: 2rem;
    }

    .hero-preview-column {
        gap: 2.35rem;
    }

    .hero-stats,
    .use-case-grid,
    .workflow-grid,
    .split-section,
    .endpoint-list {
        grid-template-columns: 1fr;
    }

    .hero-stats {
        display: grid;
    }

    .hero-stats div {
        padding: 0.75rem 0;
        margin-right: 0;
        border-right: none;
        border-bottom: 1px solid rgba(196, 160, 255, 0.18);
    }

    .hero-stats div:last-child {
        border-bottom: none;
        padding-right: 0;
    }

    .home-section {
        padding: 4rem 1rem 0;
    }

    .split-section {
        gap: 2rem;
    }

    .api-preview code {
        font-size: 0.75rem;
    }
}
