/* Office Timesheets — AI Hero
   Paired with Scripts/ots-ai-hero.js and Views/Shared/_AiHero.cshtml */

.ots-hero {
    --ots-blue: #0939C5;
    --ots-blue-dark: #062A93;
    --ots-ink: #0B1633;
    --ots-ink-soft: #43507A;
    --ots-tint: #EDF1FD;

    font-family: Helvetica, Arial, sans-serif;
    background: linear-gradient(180deg, #FFFFFF 0%, #EEF2FC 100%);
    padding: 24px 32px 0px;
    display: flex;
    justify-content: center;
    min-height: 100vh;
}

.ots-hero * { box-sizing: border-box; }

@keyframes ots-pulse {
    0%, 100% { opacity: .55; }
    50%      { opacity: 1; }
}

/* ---------- Layout ---------- */

.ots-hero__inner {
    width: 100%;
    max-width: 1080px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}

/* Both callouts share one grid cell so the swap never shifts the page. */
.ots-hero__callouts {
    display: grid;
    justify-items: center;
}

.ots-callout {
    grid-area: 1 / 1;
    text-align: center;
    max-width: 860px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 900ms ease, transform 900ms ease;
}

.ots-callout--intro { pointer-events: none; }

.ots-callout__title {
    margin: 0;
    font-size: clamp(28px, 4.2vw, 40px);
    line-height: 1.15;
    letter-spacing: -0.01em;
    color: var(--ots-ink);
    font-weight: 700;
    text-wrap: balance;
}

.ots-callout__lede {
    margin: 0;
    font-size: clamp(17px, 2.2vw, 20px);
    line-height: 1.5;
    color: var(--ots-ink-soft);
    max-width: 720px;
    text-wrap: pretty;
}

.ots-callout--ai .ots-callout__lede { max-width: 640px; }

.ots-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--ots-blue);
    color: #FFFFFF;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 7px 16px;
    border-radius: 999px;
}

.ots-badge__spark { animation: ots-pulse 1.8s ease-in-out infinite; }

/* Phase-driven visibility; the section carries data-phase. */
.ots-hero[data-phase="idle"][data-ready="true"] .ots-callout--intro {
    opacity: 1;
    transform: translateY(0);
}

.ots-hero[data-phase="done"] .ots-callout--ai {
    opacity: 1;
    transform: translateY(0);
}

/* ---------- Image stage ---------- */

.ots-stage {
    position: relative;
    width: 100%;
    aspect-ratio: 1172 / 805;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 24px 64px rgba(9, 57, 197, 0.18), 0 4px 16px rgba(11, 22, 51, 0.10);
    background: #FFFFFF;
    border: 1px solid rgba(9, 57, 197, 0.10);
}

.ots-stage__img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ots-stage__img--before { object-position: top left; }

.ots-stage__img--after {
    object-position: top center;
    clip-path: inset(0 100% 0 0);
}

/* Shimmer that rides the reveal wavefront. */
.ots-stage__band {
    position: absolute;
    top: -10%;
    bottom: -10%;
    left: 0;
    width: 120px;
    transform: translateX(-200px);
    background: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.85) 50%, rgba(255,255,255,0) 100%);
    filter: blur(2px);
    opacity: 0;
    pointer-events: none;
}

.ots-stage__canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

/* ---------- Replay ---------- */

.ots-replay {
    opacity: 0;
    pointer-events: none;
    transition: opacity 500ms ease, background-color 150ms ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #FFFFFF;
    color: var(--ots-blue);
    border: 1px solid rgba(9, 57, 197, 0.35);
    border-radius: 999px;
    padding: 10px 22px;
    font-size: 15px;
    font-weight: 600;
    font-family: Helvetica, Arial, sans-serif;
    cursor: pointer;
}

.ots-replay:hover { background: var(--ots-tint); }

.ots-replay:focus-visible {
    outline: 2px solid var(--ots-blue);
    outline-offset: 3px;
}

.ots-hero[data-phase="done"][data-loop="false"] .ots-replay {
    opacity: 1;
    pointer-events: auto;
}

/* ---------- Reduced motion: land on the payoff, skip the show ---------- */

@media (prefers-reduced-motion: reduce) {
    .ots-callout { transition: none; }
    .ots-hero .ots-callout--intro { opacity: 0; }
    .ots-hero .ots-callout--ai { opacity: 1; transform: none; }
    .ots-stage__img--after { clip-path: none; }
    .ots-stage__band,
    .ots-stage__canvas { display: none; }
    .ots-replay { display: none; }
    .ots-badge__spark { animation: none; }
}

@media (max-width: 720px) {
    .ots-hero { padding: 48px 20px 64px; }
    .ots-hero__inner { gap: 28px; }
}
