/* Contractor Command coming-soon page ({en,fr,es}/ecosystem/contractor-command.html,
   built by patch_contractor_command_coming_soon.py; behaviour in showcase.js).

   The hero reuses the homepage's line unmask and accent sweep (.hero-line and
   .hero-accent in styles.css). The showcase is a framed screenshot of each
   portal screen behind four tabs. Without showcase.js the tabs stay hidden and
   all four screens stack down the page with their captions. */

.cc-hero {
    padding-top: var(--space-64);
    padding-bottom: var(--space-48);
    text-align: center;
    max-width: 52rem;
}
.cc-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: var(--space-8);
    margin: 0 0 var(--space-24);
    padding: 6px 14px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--action-primary) 10%, var(--bg-primary));
    color: var(--action-primary);
    font-size: var(--text-sm);
    font-weight: 600;
    letter-spacing: 0.02em;
}
/* A slow pulse on the dot says "on its way" without moving any text. */
.cc-eyebrow-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
    animation: cc-pulse 2.4s ease-in-out 3;
}
@keyframes cc-pulse {
    0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--action-primary) 45%, transparent); }
    50% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--action-primary) 0%, transparent); }
}
.cc-title {
    font-size: clamp(2.5rem, 6vw, 4rem);
    line-height: 1.05;
    margin: 0 0 var(--space-24);
}
.cc-lead {
    color: var(--text-secondary);
    font-size: var(--text-lg);
    line-height: 1.6;
    margin: 0 auto var(--space-32);
    max-width: 44rem;
}
.cc-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-16);
}
.cc-actions .btn { gap: var(--space-8); }
.cc-note {
    margin: var(--space-24) 0 0;
    color: var(--text-secondary);
    font-size: var(--text-sm);
}

.cc-showcase {
    margin-bottom: var(--space-80);
}
.cc-showcase-title {
    text-align: center;
    font-size: var(--text-2xl);
    margin: 0 0 var(--space-24);
}

/* Tabs: a row of labels, each with a thin bar that fills while its screen is
   showing, so the visitor can see when the next one will arrive. */
.cc-tabs {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--space-8);
    max-width: 60rem;
    margin: 0 auto var(--space-24);
}
.cc-tabs[hidden] { display: none; }
.cc-tab {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 12px 12px 0;
    min-height: 44px;
    border: 0;
    background: none;
    color: var(--text-secondary);
    font: inherit;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: color 0.2s ease;
}
.cc-tab:hover,
.cc-tab[aria-selected="true"] { color: var(--action-primary); }
.cc-tab:focus-visible {
    outline: 2px solid var(--action-primary);
    outline-offset: 2px;
    border-radius: var(--radius-sm, 6px);
}
/* Pinned to the bottom, so the bars line up when one label wraps. */
.cc-tab-progress {
    margin-top: auto;
    display: block;
    height: 3px;
    border-radius: 3px;
    background: var(--border-light);
    overflow: hidden;
}
.cc-tab-progress > span {
    display: block;
    height: 100%;
    background: var(--action-primary);
    transform: scaleX(0);
    transform-origin: left center;
}
.cc-tab[aria-selected="true"] .cc-tab-progress > span { transform: scaleX(1); }
.cc-showcase.is-rotating .cc-tab[aria-selected="true"] .cc-tab-progress > span { transform: scaleX(0); }

/* Screens. Live, they share one grid cell and cross-fade; the incoming one
   also rises a few pixels. */
.cc-panels {
    display: grid;
    gap: var(--space-48);
    max-width: 68rem;
    margin: 0 auto;
}
.cc-showcase.is-live .cc-panels { gap: 0; }
.cc-showcase.is-live .cc-panel { grid-area: 1 / 1; }
.cc-panel { margin: 0; }
.cc-showcase.is-live .cc-panel:not(.is-current) {
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
}
.cc-showcase.is-live.is-animated .cc-panel {
    transition: opacity 0.5s ease, transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1), visibility 0s linear 0.5s;
}
.cc-showcase.is-live.is-animated .cc-panel.is-current {
    transition: opacity 0.5s ease, transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1), visibility 0s;
}

.cc-frame {
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-lg);
    background: var(--bg-primary);
    box-shadow: var(--shadow-float);
    overflow: hidden;
}
.cc-frame-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--border-light);
    background: var(--bg-secondary);
}
.cc-frame-bar > span:not(.cc-frame-title) {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--border-medium);
}
.cc-frame-title {
    margin-left: var(--space-12);
    color: var(--text-secondary);
    font-size: var(--text-sm);
}
.cc-frame img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 10;
}
.cc-caption {
    margin: var(--space-16) auto 0;
    max-width: 44rem;
    text-align: center;
    color: var(--text-secondary);
    line-height: 1.6;
}
.cc-caption strong { color: var(--text-primary); }
/* With the tabs showing, the tab already names the screen. */
.cc-showcase.is-live .cc-caption strong { display: none; }

@media (max-width: 767px) {
    .cc-hero { padding-top: var(--space-48); }
    .cc-actions .btn { width: 100%; justify-content: center; font-size: var(--text-sm); }
    .cc-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: var(--space-12); }
    .cc-tab { font-size: var(--text-sm); }
}

@media (prefers-reduced-motion: reduce) {
    .cc-title .hero-line > span { animation: none; }
    .cc-title.hero-sweeping .hero-accent { animation: none; background: none; color: var(--action-primary); }
    .cc-eyebrow-dot { animation: none; }
    .cc-showcase.is-live.is-animated .cc-panel,
    .cc-showcase.is-live.is-animated .cc-panel.is-current { transition: none; }
    .cc-showcase.is-live .cc-panel:not(.is-current) { transform: none; }
}

@media print {
    .cc-tabs { display: none; }
    .cc-showcase.is-live .cc-panels { gap: var(--space-48); }
    .cc-showcase.is-live .cc-panel { grid-area: auto; }
    .cc-showcase.is-live .cc-panel:not(.is-current) { opacity: 1; visibility: visible; transform: none; }
    .cc-showcase.is-live .cc-caption strong { display: inline; }
}
