/* =========================================
   KOPI HOMEPAGE REDESIGN
   ========================================= */

/* --- 1. Hero Section --- */
.hero-section {
    position: relative;
    padding: 10rem 0 6rem 0;
    overflow: hidden;
    background: radial-gradient(circle at 50% 0%, #1e293b 0%, #020617 60%);
}

.hero-glow-back {
    position: absolute;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 600px;
    background: var(--emerald-500);
    opacity: 0.15;
    filter: blur(120px);
    z-index: 0;
    pointer-events: none;
}

.hero-container {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr;
    gap: 4rem;
    align-items: center;
}

@media (min-width: 1024px) {
    .hero-container {
        grid-template-columns: 1.2fr 1fr;
    }
}

/* Typography */
.hero-title {
    font-size: 2.75rem;
    line-height: 1.1;
    font-weight: 800;
    color: var(--white);
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

@media (min-width: 768px) {
    .hero-title { font-size: 4rem; }
}

.text-gradient {
    background: linear-gradient(135deg, var(--emerald-400), var(--cyan-400));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.125rem;
    color: var(--slate-400);
    line-height: 1.7;
    margin-bottom: 2.5rem;
    max-width: 600px;
}

/* Release Pill */
.release-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    padding: 0.25rem 0.75rem;
    border-radius: 99px;
    margin-bottom: 2rem;
}

.pill-dot {
    width: 6px;
    height: 6px;
    background: var(--emerald-400);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--emerald-400);
}

.pill-text {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--emerald-400);
}

/* Hero Actions */
.hero-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 3rem;
}

@media (min-width: 640px) {
    .hero-actions { flex-direction: row; }
}

/* Note: Button styles are now in site.css */

/* Tech Stack */
.tech-stack-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
    font-size: 0.875rem;
    color: var(--slate-500);
}

.tech-label {
    font-weight: 600;
}

.tech-pill {
    background: var(--slate-900);
    border: 1px solid var(--slate-800);
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    color: var(--slate-400);
    font-family: var(--font-mono);
    font-size: 0.75rem;
}

/* --- 2. Terminal Visual --- */
.terminal-mockup {
    background: #0f172a; /* Slate 900 */
    border: 1px solid #334155; /* Slate 700 */
    border-radius: 0.75rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    font-family: var(--font-mono);
    font-size: 0.9rem;
}

.terminal-header {
    background: #1e293b; /* Slate 800 */
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    border-bottom: 1px solid #334155;
}

.terminal-dots {
    display: flex;
    gap: 0.5rem;
}

.dot { width: 10px; height: 10px; border-radius: 50%; }
.red { background: #ef4444; }
.yellow { background: #f59e0b; }
.green { background: #10b981; }

.terminal-tabs {
    flex: 1;
    display: flex;
    justify-content: center;
}

.tab {
    font-size: 0.8rem;
    color: var(--slate-400);
    background: #0f172a;
    padding: 0.25rem 1rem;
    border-radius: 4px;
}

.terminal-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    color: #e2e8f0;
}

.line { display: block; }
.cmd-prompt { color: var(--emerald-400); margin-right: 0.5rem; }
.text-blue { color: #60a5fa; }
.text-green { color: #4ade80; }
.text-gray { color: #64748b; }
.text-emerald { color: var(--emerald-400); }
.text-white { color: var(--white); }

.cursor {
    display: inline-block;
    color: var(--emerald-500);
    animation: blink 1s infinite;
}
@keyframes blink { 50% { opacity: 0; } }


/* --- 3. How It Works Section (New) --- */
.steps-section {
    padding: 6rem 0;
    background-color: var(--slate-950);
    position: relative;
    border-bottom: 1px solid var(--slate-800); /* Separator line */
    border-top: 1px solid var(--slate-800);
}

.steps-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    align-items: flex-start;
}

@media (min-width: 1024px) {
    .steps-grid {
        grid-template-columns: 1fr auto 1fr auto 1fr; /* 3 steps + 2 arrows */
    }
}

.step-card {
    background: rgba(30, 41, 59, 0.3);
    border: 1px solid var(--slate-800);
    border-radius: 1rem;
    padding: 2rem;
    position: relative;
    height: 100%;
    transition: transform 0.2s, border-color 0.2s;
}

.step-card:hover {
    border-color: var(--slate-700);
    transform: translateY(-5px);
}

.step-number {
    font-size: 3rem;
    font-weight: 800;
    color: var(--slate-800); /* Dark/Faint background number */
    opacity: 0.5;
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    line-height: 1;
}

.step-content {
    position: relative;
    z-index: 1;
}

.step-card h3 {
    font-size: 1.25rem;
    color: var(--emerald-400);
    margin-bottom: 0.75rem;
    font-weight: 700;
}

.step-card p {
    color: var(--slate-400);
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0;
}

.step-card code {
    background: rgba(255,255,255,0.1);
    padding: 0.1rem 0.3rem;
    border-radius: 4px;
    font-family: var(--font-mono);
    color: var(--white);
    font-size: 0.85em;
}

.step-connector {
    display: none; /* Hidden on mobile */
    color: var(--slate-700);
    padding-top: 3rem; /* Push arrow down to visually align with card center */
}

@media (min-width: 1024px) {
    .step-connector { display: flex; justify-content: center; }
}


/* --- 4. Features Section --- */
.features-section {
    padding: 6rem 0;
    background: var(--slate-950);
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    font-size: 2.5rem;
    color: var(--white);
    margin-bottom: 1rem;
}

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

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

.feature-card {
    background: rgba(30, 41, 59, 0.4); /* Slate 800 + opacity */
    border: 1px solid var(--slate-800);
    padding: 2rem;
    border-radius: 1rem;
    transition: transform 0.2s, border-color 0.2s;
}

.feature-card:hover {
    transform: translateY(-5px);
    border-color: var(--emerald-500);
}

.card-icon {
    width: 48px;
    height: 48px;
    background: var(--slate-800);
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--emerald-400);
    margin-bottom: 1.5rem;
}

.feature-card h3 {
    font-size: 1.25rem;
    color: var(--white);
    margin-bottom: 0.75rem;
}

.feature-card p {
    color: var(--slate-400);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* --- 5. Safety Diagram Section --- */
.safety-section {
    padding: 6rem 0;
    background: linear-gradient(to bottom, var(--slate-950), #061318); /* Dark teal hint */
    border-top: 1px solid var(--slate-800);
    border-bottom: 1px solid var(--slate-800);
}

.safety-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 4rem;
    align-items: center;
}

@media (min-width: 1024px) {
    .safety-layout { grid-template-columns: 1fr 1.5fr; }
}

.badge-outline {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border: 1px solid var(--emerald-500);
    color: var(--emerald-400);
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 4px;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.check-list {
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.check-list li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--slate-300);
}

.check-list li span {
    color: var(--emerald-400);
    font-weight: bold;
}

/* The Diagram Visuals */
.safety-diagram {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--slate-900);
    padding: 2rem;
    border-radius: 1rem;
    border: 1px solid var(--slate-800);
    overflow-x: auto;
}

.diagram-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    min-width: 80px;
}

.db-icon {
    width: 60px;
    height: 60px;
    background: var(--slate-800);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: bold;
    color: var(--slate-400);
    border: 2px solid var(--slate-700);
}

.source .db-icon { border-color: var(--red-500); color: var(--red-500); }
.target .db-icon { border-color: var(--emerald-500); color: var(--emerald-500); }
.gear-icon { font-size: 2rem; animation: spin 4s linear infinite; }

.diagram-arrow {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 1rem;
}

.arrow-label {
    font-size: 0.65rem;
    color: var(--slate-500);
    margin-bottom: 0.25rem;
    text-transform: uppercase;
}

.arrow-line {
    width: 100%;
    height: 2px;
    background: var(--slate-700);
    position: relative;
}
.arrow-line::after {
    content: '';
    position: absolute;
    right: 0;
    top: -3px;
    width: 0;
    height: 0;
    border-top: 4px solid transparent;
    border-bottom: 4px solid transparent;
    border-left: 6px solid var(--slate-700);
}

/* --- 6. Pricing Section --- */
.pricing-section {
    padding: 6rem 0;
}

.pricing-card-wide {
    background: var(--slate-900);
    border: 1px solid var(--slate-800);
    border-radius: 1.5rem;
    padding: 3rem;
}

.pricing-content h2 { text-align: center; margin-bottom: 1rem; }
.pricing-content p { text-align: center; color: var(--slate-400); margin-bottom: 3rem; }

/* Grid Layout for Tiers - Updated for 4 cols */
.pricing-tiers {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 768px) {
    .pricing-tiers { grid-template-columns: 1fr 1fr; }
}

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

.enterprise-banner {
    margin-top: 2rem;
    padding: 2rem 2.5rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.enterprise-tag {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--emerald-400, #34d399);
    margin-bottom: 0.5rem;
}

.enterprise-header h3 {
    margin: 0;
    font-size: 1.25rem;
    color: #fff;
}

.enterprise-desc {
    margin: 0.5rem 0 0 0;
    color: #9ca3af;
    font-size: 0.95rem;
    max-width: 680px;
}

.enterprise-action {
    flex-shrink: 0;
}

/* Tablet & Mobile responsive fallback */
@media (max-width: 900px) {
    .enterprise-banner {
        flex-direction: column;
        align-items: flex-start;
        padding: 1.5rem;
    }

    .enterprise-action,
    .enterprise-action .btn {
        width: 100%;
    }
}

.tier {
    background: var(--slate-950);
    border: 1px solid var(--slate-800);
    border-radius: 1rem;
    padding: 2rem;
    position: relative;
    display: flex;
    flex-direction: column;
}

.tier.highlighted {
    border-color: var(--emerald-500);
    background: radial-gradient(circle at top right, rgba(16, 185, 129, 0.1), transparent 60%), var(--slate-950);
}

/* Enterprise Style */
.tier.enterprise {
    border-color: var(--blue-500);
    background: radial-gradient(circle at top right, rgba(59, 130, 246, 0.1), transparent 60%), var(--slate-950);
}

.tag {
    position: absolute;
    top: -12px;
    right: 20px;
    background: var(--emerald-500);
    color: #000;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 4px;
}

.tier h3 { color: var(--slate-200); font-size: 1.25rem; }
.tier h3 small { font-size: 0.8rem; color: var(--slate-500); margin-top: 0.25rem; font-weight: 400; }

.price { font-size: 2.5rem; font-weight: 800; color: var(--white); margin: 0.5rem 0 1.5rem 0; }
.price span { font-size: 1rem; color: var(--slate-500); font-weight: normal; }

.tier-features {
    margin-bottom: 2rem;
    list-style: none;
    line-height: 2;
    color: var(--slate-400);
    flex-grow: 1; /* Pushes button to bottom */
}

.tier-features li::before {
    content: '•';
    color: var(--emerald-500);
    margin-right: 0.5rem;
}

/* Blue bullets for Enterprise */
.tier.enterprise .tier-features li::before {
    color: var(--blue-500);
}

.full-width { width: 100%; text-align: center; }

/* Badge Float for Pricing */
.badge-float {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--emerald-500);
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 9999px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    box-shadow: 0 4px 6px rgba(16, 185, 129, 0.3);
}

/* --- 1. Fix Button Styling (Secondary / Neutral) --- */
.btn-secondary {
    display: inline-block;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #ffffff !important;
    padding: 0.75rem 1.25rem;
    border-radius: 0.5rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    color: #ffffff;
}

/* --- 2. Fix 'Most Popular' Floating Badge --- */
.tier-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--emerald-500, #10b981);
    color: #000000;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 3px 12px;
    border-radius: 9999px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    box-shadow: 0 4px 10px rgba(16, 185, 129, 0.3);
    white-space: nowrap;
}

/* --- 3. Subtitle and Micro-Copy Overrides --- */
.tier-subtitle {
    font-size: 0.875rem !important;
    color: var(--slate-400) !important;
    margin: 0 0 1.5rem 0 !important;
    text-align: left !important;
}

.tier-subtext {
    margin: 0.75rem 0 0 0 !important;
    color: var(--slate-500) !important;
}

/* --- 4. Enterprise Banner Overrides --- */
.enterprise-banner {
    margin-top: 2rem;
    padding: 2rem 2.5rem;
    border-radius: 1rem;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--slate-800);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.enterprise-content {
    text-align: left !important;
}

.enterprise-tag {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--emerald-400, #34d399);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}

.enterprise-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
    color: #ffffff;
    text-align: left !important;
}

.enterprise-desc {
    margin: 0.5rem 0 0 0 !important; /* Overrides .pricing-content p margin */
    color: var(--slate-400) !important;
    font-size: 0.95rem;
    max-width: 650px;
    text-align: left !important;      /* Overrides .pricing-content p center */
    line-height: 1.5;
}

.enterprise-action {
    flex-shrink: 0;
}

@media (max-width: 900px) {
    .enterprise-banner {
        flex-direction: column;
        align-items: flex-start;
        padding: 1.5rem;
    }
    .enterprise-action,
    .enterprise-action .btn {
        width: 100%;
    }
}