/* Application task-type showcase: Survey, Chatbot, Web, App.
   Lives on /persona-8b/overview/. Moved from the home page (css/home.css and
   js/home.js) when the home page switched to the agent evaluation section.
   Colors and fonts come from dark-theme.css. */

/* home.css resets every margin; this page does not load it */
.eaas h3, .eaas p { margin: 0; }
.eaas { display: grid; grid-template-columns: 260px 1fr; gap: 16px; margin-top: 8px; }
.eaas-rail { display: flex; flex-direction: column; gap: 10px; }
.eaas-tab { text-align: left; font-family: var(--mono); color: var(--ink-dim); background: var(--bg-2); border: 1px solid var(--line-soft); border-left: 3px solid transparent; padding: 14px 16px; cursor: pointer; display: flex; align-items: center; gap: 12px; transition: all 0.2s; }
.eaas-tab:hover { border-color: var(--line); color: var(--ink); }
.eaas-tab.active { border-color: var(--line); border-left-color: var(--phos); background: var(--bg-3); color: var(--ink); }
.eaas-tab .lv { font-family: var(--mono); font-weight: 600; font-size: .72rem; letter-spacing: .04em; color: var(--ink); flex: 0 0 56px; width: 56px; white-space: nowrap; }
.eaas-tab.active .lv { color: var(--phos); text-shadow: var(--glow); }
.eaas-tab .tx { display: flex; flex-direction: column; gap: 5px; flex: 1; }
.eaas-tab .nm { font-family: var(--disp); font-weight: 700; font-size: 1.02rem; }
.eaas-tab .meter { display: flex; gap: 3px; }
.eaas-tab .meter i { width: 6px; height: 6px; border-radius: 50%; background: var(--line); display: block; }
.eaas-tab .meter i.on { background: var(--phos); box-shadow: 0 0 7px rgba(80, 137, 184, 0.6); }

.eaas-stage { border: 1px solid var(--line-soft); background: var(--bg-2); display: flex; flex-direction: column; overflow: hidden; }
.stage-viz { position: relative; min-height: 230px; background: radial-gradient(120% 140% at 50% 0, rgba(80, 137, 184, 0.05), transparent 60%); border-bottom: 1px solid var(--line-soft); overflow: hidden; }
.eaas .viz { position: absolute; inset: 0; display: none; align-items: center; justify-content: center; padding: 22px; }
.eaas .viz.on { display: flex; }

.stage-info { padding: 18px 20px; }
.stage-info .top { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.stage-info h3 { font-family: var(--disp); font-weight: 800; font-size: 1.3rem; }
.stage-info .tag { font-size: 0.78rem; color: var(--amber); }
.stage-info .desc { color: var(--ink-dim); font-size: 0.93rem; line-height: 1.55; margin-bottom: 14px; }
.stage-info .desc b { color: var(--ink); }
.stage-info .meta { display: grid; grid-template-columns: 1.7fr 1fr; gap: 18px; }
.stage-info .lab { font-size: 0.68rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--phos); margin-bottom: 7px; display: block; }
.stage-info ul { list-style: none; display: flex; flex-wrap: wrap; gap: 7px; }
.stage-info ul li { font-size: 0.8rem; color: var(--ink); border: 1px solid var(--line-soft); background: var(--bg-3); padding: 5px 10px; }
.stage-info .best { font-size: 0.88rem; color: var(--ink-dim); line-height: 1.5; }
.stage-info .best b { color: var(--ink); }

.eaas .info { display: none; }
.eaas .info.on { display: block; }

@media (max-width: 760px) {
  .eaas { grid-template-columns: 1fr; }
  .eaas-rail { flex-direction: row; flex-wrap: wrap; }
  .eaas-tab { flex: 1; min-width: 130px; }
  .stage-info .meta { grid-template-columns: 1fr; }
}

/* ---------- EAAS Visualizations ---------- */
.svy { width: 100%; max-width: 330px; display: flex; flex-direction: column; gap: 13px; }
.svy .row { display: flex; align-items: center; gap: 10px; }
.svy .lab2 { font-size: 0.72rem; color: var(--ink-dim); width: 52px; flex: none; text-align: right; }
.svy .track { flex: 1; height: 15px; background: var(--bg-3); border: 1px solid var(--line-soft); position: relative; overflow: hidden; }
.svy .fill { position: absolute; inset: 0; width: 0; background: linear-gradient(90deg, var(--phos-deep), var(--phos)); box-shadow: var(--glow); }
.eaas .viz.on .svy .fill { animation: svyfill 3.6s cubic-bezier(0.2, 0.8, 0.2, 1) infinite; }
@keyframes svyfill { 0% { width: 0; } 22% { width: var(--w); } 86% { width: var(--w); } 94%, 100% { width: 0; } }
.svy .pct { font-size: 0.66rem; color: var(--phos); width: 32px; flex: none; text-align: left; opacity: 0; }
.eaas .viz.on .svy .pct { animation: svypct 3.6s ease infinite; }
@keyframes svypct { 0%, 18% { opacity: 0; } 30%, 90% { opacity: 1; } 96%, 100% { opacity: 0; } }
.svy .cap { font-size: 0.68rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--phos); margin-bottom: 2px; }
.svy .cap b { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--phos); box-shadow: var(--glow); margin-left: 4px; vertical-align: middle; }
.eaas .viz.on .svy .cap b { animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0.2; } }

.cv { width: 100%; max-width: 300px; display: flex; flex-direction: column; gap: 9px; }
.cv .b { max-width: 78%; padding: 8px 12px; font-size: 0.78rem; line-height: 1.35; border: 1px solid var(--line-soft); opacity: 0; transform: translateY(8px); border-radius: 4px; }
.cv .me { align-self: flex-start; background: var(--bg-3); color: var(--ink); }
.cv .ai { align-self: flex-end; background: rgba(80, 137, 184, 0.1); border-color: var(--line); color: var(--ink); }
.eaas .viz.on .cv .b { animation: cvpop 6.4s ease-in-out infinite; }
.eaas .viz.on .cv .b:nth-of-type(1) { animation-delay: 0.2s; }
.eaas .viz.on .cv .b:nth-of-type(2) { animation-delay: 1.4s; }
.eaas .viz.on .cv .b:nth-of-type(3) { animation-delay: 2.6s; }
.eaas .viz.on .cv .b:nth-of-type(4) { animation-delay: 3.8s; }
@keyframes cvpop { 0% { opacity: 0; transform: translateY(8px); } 5% { opacity: 1; transform: translateY(0); } 90% { opacity: 1; transform: translateY(0); } 97%, 100% { opacity: 0; transform: translateY(8px); } }

.scr { width: 100%; max-width: 300px; }
.scr-chrome { display: flex; align-items: center; gap: 6px; padding: 7px 10px; background: var(--bg-3); border: 1px solid var(--line-soft); border-bottom: 0; }
.scr-chrome .d { width: 8px; height: 8px; border-radius: 50%; background: var(--line); }
.scr-chrome .url { margin-left: 8px; flex: 1; height: 14px; background: var(--bg); border: 1px solid var(--line-soft); border-radius: 3px; }
.scr-body { border: 1px solid var(--line-soft); background: rgba(6, 8, 7, 0.6); padding: 18px 16px; min-height: 158px; position: relative; }
.web .field { height: 18px; background: var(--bg-3); border: 1px solid var(--line-soft); margin-bottom: 13px; position: relative; overflow: hidden; }
.web .field::after { content: ""; position: absolute; inset: 0; background: rgba(80, 137, 184, 0.22); transform: scaleX(0); transform-origin: left; }
.eaas .viz.on .web .field:nth-of-type(1)::after { animation: webfill 4.2s ease infinite; animation-delay: 0.2s; }
.eaas .viz.on .web .field:nth-of-type(2)::after { animation: webfill 4.2s ease infinite; animation-delay: 1.1s; }
.eaas .viz.on .web .field:nth-of-type(3)::after { animation: webfill 4.2s ease infinite; animation-delay: 2s; }
@keyframes webfill { 0%, 6% { transform: scaleX(0); } 20%, 92% { transform: scaleX(1); } 100% { transform: scaleX(0); } }
.web .btn3 { height: 24px; width: 96px; background: var(--phos); box-shadow: var(--glow); opacity: 0.35; }
.eaas .viz.on .web .btn3 { animation: webbtn 4.2s ease infinite; }
@keyframes webbtn { 0%, 66% { opacity: 0.35; transform: scale(1); } 74% { opacity: 1; transform: scale(1.08); } 82% { opacity: 1; transform: scale(1); } 92%, 100% { opacity: 0.35; } }
.web .cursor { position: absolute; left: 40px; top: 48px; font-size: 17px; color: var(--phos); filter: drop-shadow(0 0 5px rgba(80, 137, 184, 0.8)); pointer-events: none; }
.eaas .viz.on .web .cursor { animation: webcur 4.2s cubic-bezier(0.5, 0, 0.5, 1) infinite; }
@keyframes webcur { 0%, 28% { left: 40px; top: 48px; } 36%, 46% { left: 60px; top: 79px; } 54%, 64% { left: 84px; top: 110px; } 72%, 100% { left: 60px; top: 144px; } }
.web .ring { position: absolute; width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--phos); opacity: 0; left: 36px; top: 48px; pointer-events: none; }
.eaas .viz.on .web .ring { animation: webring 4.2s ease infinite; }
@keyframes webring {
  0%, 30% { opacity: 0; transform: scale(0.5); left: 36px; top: 48px; }
  33% { opacity: 0.9; transform: scale(0.6); }
  41% { opacity: 0; transform: scale(1.6); }
  47% { left: 56px; top: 79px; transform: scale(0.5); }
  50% { opacity: 0.9; transform: scale(0.6); }
  58% { opacity: 0; transform: scale(1.6); }
  64% { left: 80px; top: 110px; transform: scale(0.5); }
  67% { opacity: 0.9; transform: scale(0.6); }
  75% { opacity: 0; transform: scale(1.6); }
  80% { left: 56px; top: 144px; transform: scale(0.5); }
  83% { opacity: 0.9; transform: scale(0.6); }
  91%, 100% { opacity: 0; transform: scale(1.6); left: 56px; top: 144px; }
}
.web .prog { position: absolute; left: 0; bottom: 0; height: 3px; background: var(--phos); box-shadow: var(--glow); width: 0; }
.eaas .viz.on .web .prog { animation: webprog 4.2s ease infinite; }
@keyframes webprog { 0%, 6% { width: 0; } 20% { width: 33%; } 46% { width: 66%; } 74% { width: 100%; } 92% { width: 100%; } 100% { width: 0; } }

.phone { width: 120px; height: 200px; border: 2px solid var(--line); border-radius: 18px; background: var(--bg); position: relative; overflow: hidden; box-shadow: 0 0 26px rgba(80, 137, 184, 0.14); }
.phone .notch { position: absolute; top: 6px; left: 50%; transform: translateX(-50%); width: 34px; height: 5px; border-radius: 3px; background: var(--line); z-index: 3; }
.phone .screens { display: flex; width: 300%; height: 100%; }
.eaas .viz.on .phone .screens { animation: appslide 6.6s cubic-bezier(0.7, 0, 0.3, 1) infinite; }
.phone .s { width: 33.333%; height: 100%; padding: 22px 12px 12px; display: flex; flex-direction: column; gap: 8px; }
.phone .s .ln { height: 9px; background: var(--bg-3); border: 1px solid var(--line-soft); }
.phone .s .ln.hl { background: rgba(80, 137, 184, 0.2); border-color: var(--line); }
.phone .s .blk { flex: 1; border: 1px solid var(--line-soft); background: rgba(80, 137, 184, 0.06); }
@keyframes appslide { 0%, 20% { transform: translateX(0); } 33%, 53% { transform: translateX(-33.333%); } 66%, 86% { transform: translateX(-66.666%); } 99%, 100% { transform: translateX(0); } }
.phone .dots { position: absolute; bottom: 8px; left: 50%; transform: translateX(-50%); display: flex; gap: 5px; z-index: 3; }
.phone .dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--line); }
.phone .tap { position: absolute; width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--phos); z-index: 4; opacity: 0; left: 50px; top: 150px; }
.eaas .viz.on .phone .tap { animation: apptap 6.6s ease infinite; }
@keyframes apptap { 0%, 14% { opacity: 0; transform: scale(0.4); left: 50px; top: 150px; } 18% { opacity: 0.95; transform: scale(0.7); } 26% { opacity: 0; transform: scale(1.7); } 46% { opacity: 0; left: 42px; top: 60px; } 50% { opacity: 0.95; transform: scale(0.7); left: 42px; top: 60px; } 58% { opacity: 0; transform: scale(1.7); } 80% { opacity: 0; left: 60px; top: 120px; } 84% { opacity: 0.95; transform: scale(0.7); left: 60px; top: 120px; } 92% { opacity: 0; transform: scale(1.7); } 100% { opacity: 0; } }

/* Browser mockup: round outer corners only so chrome + body meet flush */
.scr-chrome { border-radius: 6px 6px 0 0; }
.scr-body { border-radius: 0 0 6px 6px; }

.eaas-stage { border-radius: 12px; }
.eaas-tab { border-radius: 10px; }
.stage-info ul li,
.svy .track,
.web .field { border-radius: 6px; }

.application-types .eaas { margin-top: 0; }
.application-types .eaas-stage { min-height: 370px; }
.application-types .stage-viz { min-height: 245px; }
.application-types .stage-info { padding: 16px 22px; }
.application-types .stage-info .tag { font-size: .84rem; }
.application-types .stage-info .desc { font-size: 1rem; }
.example-context {
  display: block; color: var(--amber); font-family: var(--mono);
  font-size: .68rem; letter-spacing: .09em; line-height: 1.4; text-transform: uppercase;
}
.svy .example-context { margin-bottom: -2px; }
.svy .cap { font-size: .78rem; text-transform: none; letter-spacing: .02em; color: var(--ink); }
.application-types .svy .lab2 { font-size: .78rem; width: 64px; }
.application-types .svy .pct { font-size: .74rem; width: 38px; }
.application-types .cv .b { font-size: .84rem; }
.cv .example-context { align-self: stretch; margin-bottom: 3px; text-align: center; }
.scr-chrome .url {
  display: flex; align-items: center; padding: 0 7px; overflow: hidden;
  color: var(--ink-dim); font-family: var(--mono); font-size: .62rem;
  white-space: nowrap;
}
.mock-context { margin-bottom: 12px; }
.app-example { display: flex; flex-direction: column; align-items: center; gap: 12px; }

@media (max-width: 760px) {
  .application-types .eaas-stage { min-height: 0; }
}
@media (max-width: 520px) {
  .application-types .eaas-rail { display: grid; grid-template-columns: 1fr 1fr; }
  .application-types .eaas-tab { min-width: 0; }
}

.example-context { font-size: .73rem; }

  .application-types { max-width: 1360px; }

/* Lighter typography pass, matching home-light.css */
.eaas-tab .nm { font-weight: 500; }
.stage-info h3 { font-weight: 400; }

@media (prefers-reduced-motion: reduce) {
  .eaas *, .eaas *::before, .eaas *::after { animation: none !important; transition: none !important; }
  /* show each example in its finished state instead of an empty frame */
  .cv .b { opacity: 1; transform: none; }
}
