/* ===========================================================================
   Homepage-specific layout. Loads after chemease.css and uses its tokens.

   No media queries anywhere, per the handoff: every layout is auto-fit +
   minmax + flex-wrap + clamp(), so columns collapse on their own. The minmax
   floors are load-bearing -- they are what stop the shell mockup collapsing
   into an unreadable sliver on a phone.
   ======================================================================== */

/* --- Shared type ------------------------------------------------------ */
.ce-h1 {
    font-size: clamp(40px, 4.4vw, 58px);
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -.035em;
    text-wrap: pretty;
    margin: 0 0 18px;
}
.ce-h2 {
    font-size: 37px;
    font-weight: 700;
    line-height: 1.09;
    letter-spacing: -.03em;
    margin: 10px 0 16px;
}
.ce-h2--sm { font-size: 35px; }
.ce-h2--cta { font-size: clamp(33px, 3.8vw, 48px); line-height: 1.05; letter-spacing: -.035em; }

.ce-lead { font-size: 17.5px; line-height: 1.62; color: var(--ce-body); max-width: 470px; margin: 0 0 24px; }
.ce-body { font-size: 16.5px; line-height: 1.62; color: var(--ce-body); max-width: 450px; }

/* --- Hero ------------------------------------------------------------- */
.ce-hero {
    position: relative;
    overflow: hidden;
    background: linear-gradient(180deg, var(--ce-cream) 0%, #fff 62%);
}
.ce-hero__grid {
    position: relative;
    z-index: 1;
    padding-top: 76px;
    padding-bottom: 68px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(330px, 1fr));
    gap: 52px;
    align-items: center;
}
.ce-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 13px 6px 10px;
    border-radius: var(--ce-r-pill);
    background: #fff;
    border: 1px solid var(--ce-line-70);
    font-size: 12.5px;
    font-weight: 500;
    color: var(--ce-brand-500);
    box-shadow: var(--ce-sh-subtle);
    margin: 0 0 18px;
}
.ce-pill__dot { width: 6px; height: 6px; border-radius: var(--ce-r-pill); background: var(--ce-green); }
.ce-hero__btns { display: flex; gap: 11px; flex-wrap: wrap; margin-bottom: 24px; }

/* --- DesktopShell mockup ----------------------------------------------
   A drawn reproduction rather than a screenshot: it never goes stale when
   the app's UI changes, stays sharp at any resolution, and costs a few KB.
   -------------------------------------------------------------------- */
.ce-shell {
    border-radius: var(--ce-r-xl);
    overflow: hidden;
    border: 1px solid var(--ce-line-70);
    background: linear-gradient(150deg, var(--ce-cream), var(--ce-sand) 55%, var(--ce-cream-deep));
    box-shadow: var(--ce-sh-float);
}
.ce-shell__bar {
    height: 40px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 12px;
    background: var(--ce-glass-soft);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-bottom: 1px solid var(--ce-hover);
}
.ce-shell__bar img { border-radius: var(--ce-r-xs); }
.ce-shell__name { font-size: 12.5px; font-weight: 600; color: #413C33; }
.ce-shell__search {
    margin: 0 auto;
    height: 26px;
    width: 46%;
    max-width: 230px;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 8px;
    border-radius: var(--ce-r-xs);
    background: var(--ce-tint);
    color: var(--ce-muted);
    overflow: hidden;
}
.ce-shell__search em {
    font-style: normal;
    font-size: 11.5px;
    color: var(--ce-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}
.ce-shell__search kbd {
    font-family: var(--ce-mono);
    font-size: 9px;
    font-weight: 600;
    color: var(--ce-faint);
    border: 1px solid #d4cdbcb3;
    border-radius: 4px;
    padding: 0 3px;
    flex: none;
}
.ce-shell__gear { color: var(--ce-muted); flex: none; }

.ce-shell__body {
    display: grid;
    grid-template-columns: minmax(0, .42fr) minmax(186px, 1fr);
    min-height: 392px;
}
.ce-shell__side { padding: 8px 7px; display: flex; flex-direction: column; gap: 2px; }
.ce-shell__row {
    position: relative;
    height: 32px;
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 0 10px;
    border-radius: var(--ce-r-xs);
    font-size: 12px;
    font-weight: 500;
    color: var(--ce-body);
    overflow: hidden;
}
.ce-shell__row span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ce-shell__row i {
    width: 15px; height: 15px; flex: none; border-radius: 4px;
    background: currentColor; opacity: .28;
}
.ce-shell__row--last { margin-top: auto; }
.ce-shell__row.is-active { color: var(--ce-ink); background: var(--ce-hover); }
.ce-shell__row.is-active::before {
    content: "";
    position: absolute; left: 0; top: 50%; transform: translateY(-50%);
    width: 3px; height: 18px; border-radius: var(--ce-r-pill);
    background: var(--ce-brand-500);
}

.ce-shell__pane {
    background: var(--ce-glass-soft);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-top: 1px solid #ffffff80;
    border-left: 1px solid #ffffff80;
    border-top-left-radius: var(--ce-r);
    padding: 16px 18px;
    min-width: 0;
}
.ce-shell__head { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: flex-start; margin-bottom: 12px; }
.ce-shell__title { font-size: 15px; font-weight: 600; letter-spacing: -.01em; }
.ce-shell__meta { font-family: var(--ce-mono); font-size: 10.5px; color: var(--ce-muted); margin-top: 3px; }
.ce-shell__pills { margin-left: auto; display: flex; gap: 6px; }
.ce-shell__pill {
    padding: 5px 10px; border-radius: var(--ce-r-xs); font-size: 11px;
    background: var(--ce-tint); color: var(--ce-body);
}
.ce-shell__pill.is-brand { background: var(--ce-brand-500); color: #fff; }
.ce-shell__chart {
    border-radius: var(--ce-r);
    border: 1px solid var(--ce-line-70);
    background: #fff;
    padding: 8px;
    box-shadow: var(--ce-sh-hairline);
}

/* --- Graph Workbench spotlight ---------------------------------------- */
.ce-spot {
    padding-top: 80px;
    padding-bottom: 80px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 52px;
    align-items: center;
}
.ce-spot__card {
    border-radius: var(--ce-r-glass);
    border: 1px solid var(--ce-line-70);
    background: #fff;
    box-shadow: var(--ce-sh-hairline);
    overflow: hidden;
}
.ce-spot__head {
    display: flex; align-items: center; flex-wrap: wrap; gap: 10px;
    padding: 14px 18px; border-bottom: 1px solid var(--ce-sand);
}
.ce-spot__head b { font-size: 14.5px; font-weight: 600; }
.ce-spot__file {
    font-family: var(--ce-mono); font-size: 10.5px; color: var(--ce-body);
    background: var(--ce-sand); padding: 3px 8px; border-radius: var(--ce-r-xs);
}
.ce-spot__ok {
    margin-left: auto; font-family: var(--ce-mono); font-size: 10.5px;
    background: #10b9811a; color: var(--ce-green-dark);
    padding: 3px 8px; border-radius: var(--ce-r-xs);
}
.ce-spot__body { padding: 10px 12px 14px; }

.ce-bullets { list-style: none; margin: 20px 0 24px; padding: 0; display: grid; gap: 11px; }
.ce-bullets li {
    position: relative; padding-left: 18px;
    font-size: 15px; line-height: 1.5; color: var(--ce-body);
}
.ce-bullets li::before {
    content: ""; position: absolute; left: 0; top: 8px;
    width: 5px; height: 5px; border-radius: var(--ce-r-pill);
    background: var(--ce-brand-400);
}
.ce-bullets b { color: var(--ce-ink); font-weight: 600; }

/* --- Tools grid ------------------------------------------------------- */
.ce-tools { background: var(--ce-sand); padding: 72px 0; }
.ce-tools__head {
    display: flex; align-items: flex-end; justify-content: space-between;
    gap: 32px; flex-wrap: wrap; margin-bottom: 36px;
}
.ce-tools__note { font-size: 15px; line-height: 1.6; color: var(--ce-body); max-width: 330px; }

/* --- Android band ----------------------------------------------------- */
.ce-android {
    padding-top: 76px; padding-bottom: 76px;
    display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 52px; align-items: center;
}
.ce-android .ce-badge { margin-top: 20px; }
.ce-shots { display: grid; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); gap: 14px; }
.ce-shots figure { margin: 0; }
.ce-shots img {
    width: 100%; height: auto; display: block;
    border-radius: var(--ce-r-shot);
    border: 1px solid var(--ce-line-70);
    background: #fff;
    box-shadow: var(--ce-sh-hairline);
}
.ce-shots figcaption { margin-top: 9px; font-size: 12px; font-weight: 500; color: var(--ce-muted); }

/* --- Closing CTA ------------------------------------------------------ */
.ce-cta {
    position: relative; overflow: hidden; text-align: center;
    background: linear-gradient(180deg, #fff, var(--ce-cream));
    padding: 76px 0;
}
.ce-cta__inner { position: relative; z-index: 1; }
.ce-cta__body { max-width: 500px; margin: 0 auto 26px; }
.ce-cta__btns { display: flex; gap: 11px; justify-content: center; flex-wrap: wrap; }
.ce-cta .ce-btn--lg { padding: 15px 30px; }

/* --- Shell mockup: collapse to an icon rail when narrow -----------------
   At phone width the .42fr sidebar lands near 97px and eight of the ten
   labels ellipsise, which reads as a rendering fault rather than a design.
   A container query is used rather than a viewport media query: the mockup
   should respond to its own width, not the window's, and the handoff's rule
   was specifically against *viewport* breakpoints. Real desktop apps collapse
   their sidebar to icons at this size, so the result looks deliberate.
   -------------------------------------------------------------------- */
.ce-shell { container-type: inline-size; }

@container (max-width: 430px) {
    .ce-shell__body { grid-template-columns: minmax(0, auto) minmax(186px, 1fr); }
    .ce-shell__side { padding: 8px 6px; }
    .ce-shell__row { padding: 0 8px; justify-content: center; }
    .ce-shell__row span { display: none; }
    .ce-shell__row i { width: 16px; height: 16px; }
}
