/* ==================================================================
   SERVICES.CSS — Service Subpages Shared Stylesheet
   Carnot Automation — Agent subpages
   Requires: ../styles.css for base variables and navbar styles
   ================================================================== */

/* ─── Page shell ─────────────────────────────────────────────────── */
.svc-page {
    background: var(--color-bg, #0a0a0f);
    color: var(--color-text, #e5e7eb);
    min-height: 100vh;
    font-family: 'Inter', -apple-system, sans-serif;
}

.svc-container {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 clamp(20px, 5vw, 48px);
}

/* ─── Language switcher active state (service pages use <a> links) ── */
.lang-btn--active {
    color: #ffffff !important;
    background: rgba(99, 102, 241, 0.25) !important;
    border-color: rgba(99, 102, 241, 0.5) !important;
    cursor: default;
    pointer-events: none;
}

.lang-link {
    color: rgba(229, 231, 235, 0.45) !important;
    background: transparent !important;
    border-color: transparent !important;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    min-height: 32px;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: color 0.2s, background 0.2s;
}

.lang-link:hover {
    color: rgba(229, 231, 235, 0.85) !important;
    background: rgba(255, 255, 255, 0.06) !important;
}

/* ─── Breadcrumb ─────────────────────────────────────────────────── */
.svc-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: rgba(229, 231, 235, 0.4);
    margin-bottom: 1.5rem;
}

.svc-breadcrumb a {
    color: rgba(99, 102, 241, 0.8);
    text-decoration: none;
    transition: color 0.2s;
}

.svc-breadcrumb a:hover { color: #a5b4fc; }

.svc-breadcrumb-sep {
    opacity: 0.35;
}

/* ─── Hero ───────────────────────────────────────────────────────── */
.svc-hero {
    padding: clamp(5rem, 9vw, 8rem) 0 clamp(3rem, 6vw, 5rem);
    position: relative;
    overflow: hidden;
}

.svc-hero::before {
    content: '';
    position: absolute;
    top: -150px;
    left: 50%;
    transform: translateX(-50%);
    width: 900px;
    height: 500px;
    background: radial-gradient(ellipse, rgba(99, 102, 241, 0.08) 0%, transparent 65%);
    pointer-events: none;
}

.svc-hero-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 16px;
    background: rgba(99, 102, 241, 0.08);
    border: 1px solid rgba(99, 102, 241, 0.25);
    border-radius: 40px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    color: #a5b4fc;
    margin-bottom: 1.25rem;
}

.svc-hero-tag-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #6366f1;
    box-shadow: 0 0 8px rgba(99, 102, 241, 0.7);
    animation: svc-dot-blink 2s ease-in-out infinite;
}

@keyframes svc-dot-blink {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%       { opacity: 0.5; transform: scale(1.4); }
}

.svc-hero-h1 {
    font-size: clamp(2.1rem, 5vw, 3.6rem);
    font-weight: 800;
    color: #eaf0ff;
    line-height: 1.12;
    letter-spacing: -0.03em;
    margin-bottom: 1.1rem;
    max-width: 780px;
}

.svc-hero-desc {
    font-size: clamp(1rem, 2vw, 1.15rem);
    color: rgba(229, 231, 235, 0.6);
    line-height: 1.7;
    max-width: 600px;
    margin-bottom: 2.2rem;
}

.svc-hero-ctas {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

.svc-btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    background: linear-gradient(135deg, #6366f1, #7c3aed);
    color: #fff;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 700;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: transform 0.25s, box-shadow 0.25s;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.38);
    min-height: 48px;
    font-family: inherit;
}

.svc-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(99, 102, 241, 0.55);
}

.svc-btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 24px;
    background: transparent;
    color: rgba(229, 231, 235, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: border-color 0.25s, color 0.25s, background 0.25s;
    min-height: 48px;
    font-family: inherit;
}

.svc-btn-secondary:hover {
    border-color: rgba(99, 102, 241, 0.4);
    color: #eaf0ff;
    background: rgba(99, 102, 241, 0.06);
}

/* ─── Section wrapper ────────────────────────────────────────────── */
.svc-section {
    padding: clamp(3.5rem, 6vw, 5rem) 0;
    position: relative;
}

.svc-section::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.1), transparent);
}

.svc-section.alt-bg {
    background: rgba(14, 12, 24, 0.5);
}

.svc-section-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: rgba(165, 180, 252, 0.6);
    margin-bottom: 0.6rem;
}

.svc-section-title {
    font-size: clamp(1.5rem, 3vw, 2.1rem);
    font-weight: 800;
    color: #eaf0ff;
    line-height: 1.2;
    letter-spacing: -0.025em;
    margin-bottom: 1.2rem;
}

/* ─── Problem block ──────────────────────────────────────────────── */
.svc-problem-card {
    background: rgba(14, 12, 26, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 18px;
    padding: clamp(1.5rem, 4vw, 2.5rem);
    max-width: 760px;
    backdrop-filter: blur(12px);
}

.svc-problem-text {
    font-size: 1.05rem;
    color: rgba(229, 231, 235, 0.65);
    line-height: 1.75;
    margin: 0;
}

/* ─── Steps ──────────────────────────────────────────────────────── */
.svc-steps {
    display: flex;
    flex-direction: column;
    gap: 0;
    counter-reset: svc-step;
    max-width: 760px;
}

.svc-step {
    display: grid;
    grid-template-columns: 48px 1fr;
    gap: 0 20px;
    position: relative;
}

.svc-step:not(:last-child)::after {
    content: '';
    position: absolute;
    left: 23px;
    top: 48px;
    bottom: -8px;
    width: 2px;
    background: linear-gradient(180deg, rgba(99, 102, 241, 0.35), rgba(99, 102, 241, 0.05));
}

.svc-step-num {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(99, 102, 241, 0.12);
    border: 1px solid rgba(99, 102, 241, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 800;
    color: #a5b4fc;
    flex-shrink: 0;
    z-index: 1;
}

.svc-step-body {
    padding: 12px 0 32px;
}

.svc-step-title {
    font-size: 1rem;
    font-weight: 700;
    color: #eaf0ff;
    margin-bottom: 4px;
}

.svc-step-desc {
    font-size: 0.92rem;
    color: rgba(229, 231, 235, 0.55);
    line-height: 1.6;
    margin: 0;
}

/* ─── Workflow diagram ───────────────────────────────────────────── */
.svc-workflow-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 12px 0;
}

.svc-workflow-wrap::-webkit-scrollbar { display: none; }

.svc-workflow {
    display: flex;
    align-items: center;
    gap: 0;
    min-width: max-content;
    padding: 8px 4px;
}

.svc-wf-node {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 18px;
    background: rgba(99, 102, 241, 0.08);
    border: 1px solid rgba(99, 102, 241, 0.22);
    border-radius: 40px;
    font-size: 0.82rem;
    font-weight: 600;
    color: #c4b5fd;
    white-space: nowrap;
    position: relative;
    transition: background 0.3s, border-color 0.3s;
}

.svc-wf-node.active,
.svc-wf-node:hover {
    background: rgba(99, 102, 241, 0.2);
    border-color: rgba(99, 102, 241, 0.5);
    color: #fff;
}

.svc-wf-node.escalation {
    border-color: rgba(245, 158, 11, 0.35);
    background: rgba(245, 158, 11, 0.07);
    color: #fbbf24;
}

.svc-wf-arrow {
    flex-shrink: 0;
    width: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.svc-wf-arrow::before {
    content: '';
    display: block;
    width: 24px;
    height: 2px;
    border-top: 2px dashed rgba(99, 102, 241, 0.3);
    animation: svc-flow 1.8s linear infinite;
}

.svc-wf-arrow::after {
    content: '';
    position: absolute;
    right: 4px;
    width: 0;
    height: 0;
    border-top: 5px solid transparent;
    border-bottom: 5px solid transparent;
    border-left: 6px solid rgba(99, 102, 241, 0.4);
}

@keyframes svc-flow {
    from { background-position: 0 0; }
    to   { background-position: 24px 0; }
}

/* Mobile vertical workflow */
.svc-workflow-vertical {
    display: none;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
}

.svc-workflow-vertical .svc-wf-node {
    width: 100%;
    border-radius: 12px;
    justify-content: flex-start;
}

.svc-workflow-vertical .svc-wf-arrow {
    width: 48px;
    height: 36px;
    flex-direction: column;
    justify-content: center;
}

.svc-workflow-vertical .svc-wf-arrow::before {
    width: 2px;
    height: 24px;
    border-top: none;
    border-left: 2px dashed rgba(99, 102, 241, 0.3);
    margin-left: 22px;
}

.svc-workflow-vertical .svc-wf-arrow::after {
    right: unset;
    left: 18px;
    top: unset;
    bottom: 4px;
    border-top: 6px solid rgba(99, 102, 241, 0.4);
    border-bottom: none;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
}

/* ─── Impact metrics ─────────────────────────────────────────────── */
.svc-metrics {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.svc-metric {
    background: rgba(14, 12, 26, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    padding: 28px 24px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    transition: border-color 0.3s, transform 0.3s;
    backdrop-filter: blur(8px);
}

.svc-metric:hover {
    border-color: rgba(99, 102, 241, 0.25);
    transform: translateY(-3px);
}

.svc-metric-value {
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    font-weight: 900;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    letter-spacing: -0.03em;
}

.svc-metric-label {
    font-size: 0.85rem;
    color: rgba(229, 231, 235, 0.5);
    line-height: 1.4;
}

/* ─── Pricing cards ──────────────────────────────────────────────── */
.svc-pricing-grid {
    display: grid;
    gap: 18px;
}

.svc-pricing-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.svc-pricing-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }

.svc-price-card {
    background: rgba(14, 12, 26, 0.78);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 20px;
    padding: clamp(1.5rem, 3vw, 2rem);
    display: flex;
    flex-direction: column;
    gap: 0;
    position: relative;
    transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
    backdrop-filter: blur(12px);
}

.svc-price-card:hover {
    transform: translateY(-4px);
    border-color: rgba(99, 102, 241, 0.28);
    box-shadow: 0 12px 40px rgba(99, 102, 241, 0.1);
}

.svc-price-card--popular {
    border-color: rgba(99, 102, 241, 0.4);
    background: rgba(99, 102, 241, 0.06);
    box-shadow: 0 0 40px rgba(99, 102, 241, 0.12);
}

.svc-popular-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 12px;
    background: linear-gradient(135deg, #6366f1, #7c3aed);
    border-radius: 30px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: #fff;
    margin-bottom: 1rem;
    width: fit-content;
}

.svc-price-tier {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: rgba(165, 180, 252, 0.65);
    margin-bottom: 0.75rem;
}

.svc-price-setup-label {
    font-size: 10px;
    color: rgba(229, 231, 235, 0.35);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.svc-price-setup {
    font-size: clamp(1.1rem, 2vw, 1.4rem);
    font-weight: 700;
    color: #eaf0ff;
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin: 4px 0 2px;
}

.svc-price-monthly {
    font-size: 0.82rem;
    color: rgba(229, 231, 235, 0.45);
    margin-bottom: 1.25rem;
    margin-top: 2px;
}

.svc-features {
    list-style: none;
    padding: 0;
    margin: 0 0 1.75rem 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}

.svc-feature {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.88rem;
    color: rgba(229, 231, 235, 0.65);
    line-height: 1.45;
}

.svc-feature::before {
    content: '\2713';
    color: #6366f1;
    font-weight: 700;
    font-size: 0.85rem;
    flex-shrink: 0;
    margin-top: 1px;
}

.svc-price-cta {
    display: block;
    width: 100%;
    padding: 13px;
    text-align: center;
    border-radius: 10px;
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid rgba(99, 102, 241, 0.3);
    background: transparent;
    color: #a5b4fc;
    min-height: 46px;
    font-family: inherit;
}

.svc-price-cta:hover {
    background: rgba(99, 102, 241, 0.15);
    border-color: rgba(99, 102, 241, 0.6);
    color: #fff;
}

.svc-price-card--popular .svc-price-cta {
    background: linear-gradient(135deg, #6366f1, #7c3aed);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 4px 18px rgba(99, 102, 241, 0.35);
}

.svc-price-card--popular .svc-price-cta:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 28px rgba(99, 102, 241, 0.5);
}

.svc-enterprise-text {
    font-size: 0.88rem;
    color: rgba(229, 231, 235, 0.5);
    line-height: 1.5;
    margin-bottom: 1.5rem;
    flex: 1;
}

/* ─── Closing CTA section ────────────────────────────────────────── */
.svc-cta-section {
    padding: clamp(3.5rem, 6vw, 5.5rem) 0;
}

.svc-cta-box {
    background: rgba(14, 12, 26, 0.8);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 24px;
    padding: clamp(2.5rem, 5vw, 4rem) clamp(1.5rem, 5vw, 4rem);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.svc-cta-box::before {
    content: '';
    position: absolute;
    top: -60px; left: 50%;
    transform: translateX(-50%);
    width: 500px; height: 300px;
    background: radial-gradient(ellipse, rgba(99, 102, 241, 0.1) 0%, transparent 65%);
    pointer-events: none;
}

.svc-cta-eyebrow {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: rgba(165, 180, 252, 0.6);
    margin-bottom: 0.75rem;
}

.svc-cta-title {
    font-size: clamp(1.4rem, 3vw, 2rem);
    font-weight: 800;
    color: #eaf0ff;
    letter-spacing: -0.025em;
    line-height: 1.2;
    margin-bottom: 1rem;
}

.svc-cta-sub {
    font-size: 1rem;
    color: rgba(229, 231, 235, 0.5);
    max-width: 480px;
    margin: 0 auto 2rem;
    line-height: 1.65;
}

.svc-cta-actions {
    display: flex;
    gap: 14px;
    justify-content: center;
    flex-wrap: wrap;
}

.svc-cta-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.88rem;
    color: rgba(165, 180, 252, 0.7);
    text-decoration: none;
    padding: 8px 0;
    transition: color 0.2s;
}

.svc-cta-link:hover { color: #a5b4fc; }

/* ─── ARIA flagship badge ─────────────────────────────────────────── */
.svc-aria-flag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    background: linear-gradient(135deg, rgba(99,102,241,0.15), rgba(124,58,237,0.1));
    border: 1px solid rgba(99, 102, 241, 0.35);
    border-radius: 40px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: #c4b5fd;
    margin-bottom: 1.25rem;
}

.svc-aria-flag-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #6366f1;
    box-shadow: 0 0 8px rgba(99, 102, 241, 0.8);
    animation: svc-dot-blink 2s ease-in-out infinite;
}

/* ─── ARIA deployment timeline ───────────────────────────────────── */
.svc-timeline {
    display: flex;
    align-items: flex-start;
    gap: 0;
    position: relative;
}

.svc-timeline::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 20px;
    right: 20px;
    height: 2px;
    background: linear-gradient(90deg, rgba(99,102,241,0.5), rgba(20,184,166,0.3));
    z-index: 0;
}

.svc-timeline-step {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    z-index: 1;
}

.svc-timeline-dot {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(99, 102, 241, 0.15);
    border: 2px solid rgba(99, 102, 241, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 800;
    color: #a5b4fc;
    margin-bottom: 12px;
    transition: background 0.3s, border-color 0.3s;
}

.svc-timeline-step:hover .svc-timeline-dot {
    background: rgba(99, 102, 241, 0.3);
    border-color: #6366f1;
}

.svc-timeline-day {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: rgba(165, 180, 252, 0.5);
    margin-bottom: 4px;
}

.svc-timeline-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: rgba(229, 231, 235, 0.75);
    line-height: 1.3;
}

/* ─── Gradient text utility ──────────────────────────────────────── */
.svc-grad {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #14b8a6 100%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: svc-grad-flow 6s ease infinite;
}

@keyframes svc-grad-flow {
    0%, 100% { background-position: 0% 50%; }
    50%       { background-position: 100% 50%; }
}

/* ─── Two-column section layout ──────────────────────────────────── */
.svc-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(2rem, 5vw, 4rem);
    align-items: start;
}

.svc-split.reversed { direction: rtl; }
.svc-split.reversed > * { direction: ltr; }

/* ─── Footer for service pages ───────────────────────────────────── */
.svc-footer-services {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.svc-footer-services-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: rgba(165, 180, 252, 0.4);
    margin-bottom: 1rem;
}

.svc-footer-services-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.svc-footer-services-links a {
    font-size: 0.82rem;
    color: rgba(229, 231, 235, 0.4);
    text-decoration: none;
    transition: color 0.2s;
}

.svc-footer-services-links a:hover { color: #a5b4fc; }

/* ─── Responsive ─────────────────────────────────────────────────── */
@media (max-width: 900px) {
    .svc-pricing-grid.cols-3 {
        grid-template-columns: 1fr;
    }

    .svc-split {
        grid-template-columns: 1fr;
    }

    .svc-split.reversed { direction: ltr; }

    .svc-timeline {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
    }

    .svc-timeline::before {
        top: 20px;
        bottom: 20px;
        left: 19px;
        right: unset;
        width: 2px;
        height: auto;
        background: linear-gradient(180deg, rgba(99,102,241,0.5), rgba(20,184,166,0.3));
    }

    .svc-timeline-step {
        flex-direction: row;
        align-items: center;
        text-align: left;
        gap: 16px;
        padding: 8px 0;
    }

    .svc-timeline-step:first-child { padding-top: 0; }

    .svc-timeline-dot {
        flex-shrink: 0;
        margin-bottom: 0;
    }

    .svc-timeline-info { display: flex; flex-direction: column; }

    .svc-workflow-wrap { display: none; }
    .svc-workflow-vertical { display: flex; }
}

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

    .svc-pricing-grid.cols-2 {
        grid-template-columns: 1fr;
    }

    .svc-hero-ctas {
        flex-direction: column;
    }

    .svc-btn-primary,
    .svc-btn-secondary {
        width: 100%;
        justify-content: center;
    }

    .svc-cta-actions {
        flex-direction: column;
        align-items: center;
    }

    .svc-cta-actions .svc-btn-primary {
        width: 100%;
        max-width: 400px;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .svc-metrics {
        grid-template-columns: 1fr;
    }

    .svc-hero-h1 {
        font-size: 1.8rem;
    }
}
