/* =============================================================================
   GROW · frontend4 (experimental) — wabi.ai-inspired hero
   -----------------------------------------------------------------------------
   Sections:
     1. Tokens + page chrome (the marketing page itself)
     2. App mock — a faithful recreation of the Skybar shell
        (values copied from resources/css/skybar.css + live computed styles)
     3. Agent cards — REUSABLE component (.agent-card). Drop the markup from
        index.html into any other slide; it only depends on this section.
   ============================================================================= */

/* ── 1. Tokens + page ─────────────────────────────────────────────────────── */
:root {
    --page-bg: #f2f2f0;            /* wabi: oklch(98% .003 85) — warm near-white */
    --ink: #141413;
    --ink-soft: #474744;
    --ink-mute: #8a8a86;
    --font-serif: 'Fraunces', 'Tiempos Headline', 'Iowan Old Style', Georgia, serif;
    --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
    --font-display: 'Plus Jakarta Sans', 'Inter', system-ui, sans-serif;
    --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

    /* brand (only ever inside the app mock, never on the page) */
    --brand-grad: linear-gradient(to right, #ff1e80 0%, #9c32b0 50%, #6000ff 100%);
    --brand-grad-v: linear-gradient(180deg, #ff1e80 0%, #9c32b0 50%, #6000ff 100%);
    --purple: #7c3aed;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility; }
body {
    background: var(--page-bg);
    color: var(--ink);
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.5;
    min-height: 100vh;
    overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }

.page {
    min-height: 100vh;
    display: grid;
    grid-template-rows: auto 1fr auto;
    padding: 0 clamp(20px, 3.2vw, 48px);
}

/* header */
.top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: clamp(20px, 2.6vw, 40px) 0 0;
}
.brand { display: inline-flex; align-items: center; line-height: 0; padding: 4px 0; }
.brand svg { height: 22px; width: auto; display: block; overflow: visible; }
.btn-login {
    display: inline-flex; align-items: center; justify-content: center;
    height: 54px; padding: 0 28px;
    border-radius: 999px;
    background: #ffffff;
    color: var(--ink);
    font-family: var(--font-sans);
    font-size: 16.5px; font-weight: 500; letter-spacing: -0.01em;
    border: 1px solid rgba(17, 17, 16, 0.04);
    box-shadow: 0 1px 2px rgba(17,17,16,0.04), 0 10px 30px -10px rgba(17,17,16,0.18);
    transition: transform .25s cubic-bezier(.2,.7,.2,1), box-shadow .25s;
}
.btn-login:hover { transform: translateY(-1px); box-shadow: 0 2px 4px rgba(17,17,16,0.05), 0 16px 40px -12px rgba(17,17,16,0.24); }

/* hero */
.hero {
    display: grid;
    grid-template-columns: minmax(360px, 0.85fr) minmax(0, 1.4fr);
    align-items: center;
    gap: clamp(24px, 4vw, 64px);
    padding: clamp(24px, 4vh, 56px) 0;
}
.copy { max-width: 540px; padding-left: clamp(0px, 4.5vw, 84px); }
.copy h1 {
    font-family: var(--font-serif);
    font-weight: 400;
    font-optical-sizing: auto;
    font-variation-settings: 'SOFT' 50;
    font-size: clamp(54px, 4.8vw, 90px);
    line-height: 1.0;
    letter-spacing: -0.025em;
    margin: 0 0 clamp(18px, 2vw, 28px);
    color: var(--ink);
}
.copy h1 .line { display: block; }
.copy p {
    font-family: var(--font-sans);
    font-weight: 300;
    font-size: clamp(17px, 1.25vw, 22px);
    line-height: 1.62;
    color: var(--ink-soft);
    letter-spacing: -0.008em;
    margin: 0 0 clamp(26px, 2.6vw, 38px);
    max-width: 540px;
}
.copy p sup { font-size: 0.5em; font-weight: 400; vertical-align: top; position: relative; top: 0.2em; }
.btn-dark {
    display: inline-flex; align-items: center; gap: 10px;
    height: 56px; padding: 0 30px;
    border-radius: 999px;
    background: var(--ink); color: #fff;
    font-size: 16.5px; font-weight: 500; letter-spacing: -0.01em;
    box-shadow: 0 10px 30px -12px rgba(17,17,16,0.45);
    transition: transform .25s cubic-bezier(.2,.7,.2,1), box-shadow .25s, background .2s;
}
.btn-dark:hover { transform: translateY(-1px); background: #000; box-shadow: 0 16px 40px -14px rgba(17,17,16,0.55); }
.btn-dark svg { width: 16px; height: 16px; transition: transform .25s; }
.btn-dark:hover svg { transform: translateX(3px); }

/* footer */
.foot {
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    padding: 0 0 clamp(18px, 2.4vw, 32px);
    font-size: 14px; color: var(--ink-mute);
}
.foot nav { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 0; }
.foot nav a { color: var(--ink-soft); }
.foot nav a:hover { color: var(--ink); }
.foot nav span { margin: 0 12px; opacity: .5; }
.foot .social { display: flex; gap: 8px; }
.foot .social a {
    width: 40px; height: 40px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    background: #fff; color: var(--ink);
    box-shadow: 0 1px 2px rgba(17,17,16,0.04), 0 6px 18px -8px rgba(17,17,16,0.18);
}
.foot .social svg { width: 16px; height: 16px; }

/* ── 2. App mock — the Skybar shell ───────────────────────────────────────── */
/* Natural size 1180×740, scaled to fit. Text inside is real text, so it is
   resolution-independent (retina crisp). */
.stage {
    --mock-w: 1180;
    --mock-h: 740;
    --s: 0.72; /* overwritten by js/main.js on resize */
    position: relative;
    width: calc(var(--mock-w) * 1px * var(--s));
    height: calc(var(--mock-h) * 1px * var(--s));
    justify-self: end;
}
.mock-wrap {
    position: absolute; inset: 0;
    transform-origin: top left;
    transform: scale(var(--s));
    width: calc(var(--mock-w) * 1px);
    height: calc(var(--mock-h) * 1px);
}
.skybar-app-container {
    position: relative;
    width: 100%; height: 100%;
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 24px;
    box-shadow:
        0 1px 0 rgba(15, 23, 42, 0.02),
        0 8px 24px -6px rgba(15, 23, 42, 0.10),
        0 24px 60px -12px rgba(15, 23, 42, 0.18),
        0 48px 100px -28px rgba(15, 23, 42, 0.20);
    overflow: hidden;
    display: flex; flex-direction: column;
    font-family: var(--font-sans);
    color: #0f172a;
    letter-spacing: -0.005em;
    animation: mock-in 1s cubic-bezier(.2,.7,.2,1) both;
}
@keyframes mock-in {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: translateY(0); }
}
/* brand-gradient stripe on the LEFT edge — 2px, long top/bottom fades
   (skybar.css .skybar-app-gradient-bar, verbatim) */
.skybar-app-gradient-bar {
    position: absolute; top: 0; left: 0; bottom: 0; width: 2px;
    background-image: var(--brand-grad-v);
    z-index: 40; pointer-events: none;
    -webkit-mask-image: linear-gradient(180deg, transparent 0%, rgba(0,0,0,.4) 15%, #000 35%, #000 65%, rgba(0,0,0,.4) 85%, transparent 100%);
            mask-image: linear-gradient(180deg, transparent 0%, rgba(0,0,0,.4) 15%, #000 35%, #000 65%, rgba(0,0,0,.4) 85%, transparent 100%);
}
.skybar-app-gradient-bar--right { left: auto; right: 0; opacity: .5; }

/* chrome (top bar) — skybar.css .skybar-chrome */
.skybar-chrome {
    position: relative; flex-shrink: 0;
    height: 52px;
    display: flex; align-items: center; gap: 8px;
    padding: 0 12px 0 8px;
    background-color: #fff;
    background-image: linear-gradient(to bottom, rgba(15,23,42,.045) 0%, rgba(15,23,42,.02) 30%, rgba(255,255,255,0) 60%);
    border-bottom: 1px solid rgba(15, 23, 42, 0.06);
    font-size: 13px; font-weight: 500;
}
.sb-logo { display: inline-flex; align-items: center; height: 32px; padding: 0 4px; border-radius: 10px; }
.sb-logo .g {
    width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center;
    font-family: var(--font-display); font-size: 22px; font-weight: 700; line-height: 1; letter-spacing: -0.04em;
    background: var(--brand-grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent;
}
.sb-logo svg { color: #6b7280; margin-top: 3px; }
.sb-pill {
    display: inline-flex; align-items: center; gap: 4px;
    height: 32px; padding: 0 12px; border-radius: 9999px;
    background: rgba(15, 23, 42, 0.04); color: #0f172a; font-weight: 500;
}
.sb-pill svg { width: 10px; height: 10px; }
.sb-spacer { flex: 1; }
.sb-right { display: inline-flex; align-items: center; gap: 8px; }

/* dynamic island (brand tone, syncing) — _dynamic-island.css */
.skybar-island-pill {
    position: relative; display: inline-flex; align-items: center; gap: 8px;
    height: 32px; padding: 0 14px 0 9px; border-radius: 9999px; min-width: 290px;
    background: #fbfaff; border: 1px solid rgba(124, 58, 237, 0.22);
    box-shadow: 0 1px 2px -1px rgba(15,23,42,.06);
    color: #6d28d9; font-weight: 500;
}
.skybar-island-pill .dot {
    width: 8px; height: 8px; border-radius: 50%; background: #7c3aed;
    box-shadow: 0 0 0 0 rgba(124,58,237,.45); animation: ping 1.8s ease-out infinite;
}
@keyframes ping { 0% { box-shadow: 0 0 0 0 var(--ping, rgba(124,58,237,.45)); } 100% { box-shadow: 0 0 0 8px transparent; } }
.skybar-island-pill .mute { color: #6b7280; font-weight: 400; white-space: nowrap; }
.skybar-island-pill #actionCount { display: inline-block; min-width: 5.2ch; text-align: right; font-variant-numeric: tabular-nums; }
.skybar-island-snake { position: absolute; inset: -1px; width: calc(100% + 2px); height: calc(100% + 2px); pointer-events: none; overflow: visible; }
.skybar-island-snake rect {
    width: calc(100% - 2px); height: calc(100% - 2px); x: 1px; y: 1px;
    stroke-width: 1.5; stroke-dasharray: 0.28 0.72; stroke-linecap: round;
    animation: snake 2.6s linear infinite;
}
@keyframes snake { to { stroke-dashoffset: -1; } }

/* project switcher — .skybar-projects-trigger */
.sb-btn {
    display: inline-flex; align-items: center; gap: 8px;
    height: 32px; padding: 0 12px; border-radius: 10px;
    background: #fff; border: 1px solid rgba(15, 23, 42, 0.16); color: #0f172a; font-weight: 500;
}
.sb-btn .dots { display: inline-flex; gap: 4px; margin-right: -2px; }
.sb-btn .dots i { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; display: block; }
.sb-btn svg { width: 16px; height: 16px; }
.sb-bell { position: relative; width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; }
.sb-bell svg { width: 18px; height: 18px; color: #4b5563; }
.sb-bell i { position: absolute; top: 5px; right: 6px; width: 7px; height: 7px; border-radius: 50%; background: #ef4444; border: 1.5px solid #fff; }
.sb-avatar {
    width: 30px; height: 30px; border-radius: 50%;
    background: linear-gradient(135deg, #ff1e80 0%, #9c32b0 50%, #6000ff 100%);
    color: #fff; font-size: 11px; font-weight: 600; letter-spacing: .02em;
    display: inline-flex; align-items: center; justify-content: center;
}

/* content area — .skybar-app-content (slate-50) */
.skybar-app-content { flex: 1; overflow: hidden; background: #f8fafc; }
.skybar-app-content-inner { padding: 30px 32px 32px; height: 100%; display: flex; flex-direction: column; }
.skybar-page-title { margin-bottom: 22px; display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }
.skybar-page-title h1 {
    font-family: var(--font-display); font-size: 28px; font-weight: 600; letter-spacing: -0.022em;
    color: #111827; margin: 0 0 4px; line-height: 1.15;
}
.skybar-page-title p { margin: 0; font-size: 15px; color: #6b7280; font-weight: 400; }
.skybar-page-title .live {
    display: inline-flex; align-items: center; gap: 7px; height: 28px; padding: 0 11px 0 9px; border-radius: 999px;
    background: #fff; border: 1px solid rgba(15,23,42,.08);
    font-size: 12px; font-weight: 600; letter-spacing: -0.005em; text-transform: none; color: #0f172a; margin-bottom: 6px;
}
.skybar-page-title .live .live__g { width: 14px; height: 14px; flex-shrink: 0; }
.skybar-page-title .live i { width: 7px; height: 7px; border-radius: 50%; background: #10b981; --ping: rgba(16,185,129,.5); animation: ping 1.8s ease-out infinite; }
.agent-grid {
    flex: 1; min-height: 0;
    display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; gap: 16px;
}

/* ── 3. Agent cards — REUSABLE ────────────────────────────────────────────── */
/* Markup contract (see index.html):
     <article class="agent-card" data-agent="costs">
       <div class="agent-card__top">
         <div><h3 class="agent-card__title">Product Costs</h3><p class="agent-card__sub">role</p></div>
         <span class="agent-card__status"><i></i>Tracking</span>
       </div>
       <div class="feed"><ul class="feed__track">
         <li class="feed__row"> <span class="feed__what"><b>what</b><span>where</span></span>
                                <span class="feed__val">value</span> <span class="chip chip--ok">state</span> </li>
       </ul></div>
     </article>
   At rest the feed is still; on hover it scrolls upward (rows are cloned once
   by js/main.js for a seamless loop) and pauses in place on mouse-out.
   Styling mirrors the Skybar stat tile (white, hairline border, soft shadow). */
.agent-card {
    position: relative; min-height: 0;
    background: #fff;
    border: 1px solid rgba(15, 23, 42, 0.06);
    border-radius: 12px;
    box-shadow: 0 1px 0 rgba(15,23,42,.02), 0 1px 3px -1px rgba(15,23,42,.06);
    padding: 20px 22px 0;
    display: grid; grid-template-rows: auto 1fr;
    overflow: hidden;
    font-family: var(--font-sans);
}
.agent-card__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.agent-card__status {
    flex-shrink: 0; margin-top: 2px;
    display: inline-flex; align-items: center; gap: 6px;
    height: 24px; padding: 0 10px 0 8px; border-radius: 999px;
    background: #f1f5f9; color: #475569; font-size: 11px; font-weight: 600; letter-spacing: .01em;
}
.agent-card__status i { width: 6px; height: 6px; border-radius: 50%; background: #64748b; }
.agent-card__title {
    margin: 0;
    font-family: var(--font-display); font-size: 22px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.15; color: #0f172a;
}
.agent-card__sub { margin: 0; font-size: 12.5px; color: #6b7280; font-weight: 400; }

/* the feed (static) */
.feed {
    position: relative; min-height: 0; overflow: hidden;
    -webkit-mask-image: linear-gradient(180deg, #000 0, #000 78%, transparent 100%);
            mask-image: linear-gradient(180deg, #000 0, #000 78%, transparent 100%);
}
.feed__track { list-style: none; margin: 0; padding: 0; animation: feed var(--speed, 24s) linear infinite; animation-play-state: paused; }
.agent-card:hover .feed__track { animation-play-state: running; }
@keyframes feed { to { transform: translateY(-50%); } }
.feed__row {
    display: flex; align-items: center; gap: 10px;
    height: 38px; border-top: 1px solid rgba(15,23,42,.05);
    font-size: 12.5px; line-height: 1.2;
}
.feed__what { flex: 1; min-width: 0; display: flex; align-items: baseline; gap: 8px; white-space: nowrap; overflow: hidden; }
.feed__what b { font-weight: 600; color: #0f172a; letter-spacing: -0.005em; }
.feed__what span { color: #6b7280; overflow: hidden; text-overflow: ellipsis; }
.feed__val { font-family: var(--font-mono); font-size: 11.5px; color: #374151; white-space: nowrap; font-variant-numeric: tabular-nums; }
.chip {
    flex-shrink: 0; min-width: 66px; text-align: center;
    height: 20px; padding: 0 8px; border-radius: 999px; line-height: 20px;
    font-size: 10.5px; font-weight: 600; letter-spacing: .02em;
}
.chip--ok    { background: #ecfdf5; color: #047857; }
.chip--brand { background: #f5f3ff; color: #6d28d9; }
.chip--mute  { background: #f1f5f9; color: #64748b; }
.chip--warn  { background: #fffbeb; color: #b45309; }

/* ── responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 1100px) {
    .hero { grid-template-columns: 1fr; gap: 40px; padding-top: 40px; }
    .copy { padding-left: 0; max-width: 640px; }
    .stage { justify-self: start; }
}
@media (max-width: 640px) {
    .btn-login { height: 46px; padding: 0 20px; font-size: 15px; }
    .btn-dark { height: 52px; padding: 0 26px; font-size: 16px; }
    .foot { flex-direction: column; align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; }
}
