/* The box grid: 1px hairlines, no gaps, square corners, no shadows. Products uses it, and so can any page that loads
   this file (Partners, Talk to us): every grid rule is scoped to .pgrid on a body.home page, so no page class is needed.
   Loaded after technical.css and type.css. Type comes from the type.css variables, with the technical.css faces as a
   fallback. Rows are .text-section elements so home.js draws a signal wire along each one.

   Markup:  .pgrid > .text-section.prow[.prow-wide-narrow (+ .prow-six-four for 60/40) | .prow-narrow-wide | .prow-half] > article.pcard
   Cards:   .pcard-l (left column) and .pcard-r (right column, draws the divider), or .pcard-full (the whole row).
            .pcard-media lays a full card out as text on the left and a .pmedia element (the video) on the right.
   Inside:  .pglyph, .pbody > .ptitle + .pblurb + .pchips (ul) + .psteps (ol) + .pactions > .plink (+ .parrow). */
html body.home{
  --p-display:var(--font-display,var(--type-display));
  --p-text:var(--font-text,var(--type-text));
  --p-mono:var(--font-mono,"EDX Display",ui-monospace,monospace);
  --grid-line:color-mix(in srgb,var(--ink) 15%,transparent);
  --card-pad:clamp(1.5rem,1rem + 1.6vw,2.75rem);
}
html[data-theme=dark] body.home{--grid-line:color-mix(in srgb,var(--ink) 17%,transparent)}

/* Products header: title left, lede right. */
html body.products-page.home .products-intro{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);align-items:end;gap:1.5rem clamp(2rem,5vw,6rem);max-width:none;padding-block:clamp(3rem,1.5rem + 5vw,7rem) clamp(2.5rem,1.5rem + 3vw,4.5rem)}
html body.products-page.home .products-intro h1{margin:0;max-width:none;font-family:var(--p-display);font-size:clamp(3.25rem,1.8rem + 5.2vw,7.5rem);font-weight:var(--display-weight,560);line-height:.95;letter-spacing:var(--display-tracking,-.035em);word-spacing:0;text-transform:none;color:var(--ink)}
html body.products-page.home .products-intro .lede{justify-self:end;max-width:33rem;margin:0;font-family:var(--p-text);font-size:clamp(1.0625rem,.96rem + .35vw,1.3125rem);line-height:1.55;letter-spacing:-.005em;color:var(--ink-soft)}

/* The grid. The outer frame is drawn by .pgrid; each row adds its top line (the .text-section border). */
html body.home .pgrid{border:1px solid var(--grid-line);border-top:0;margin-bottom:clamp(4rem,2rem + 6vw,8rem)}
html body.home .pgrid>.prow{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:0;padding:0;border-top:1px solid var(--grid-line)}
html body.home .pgrid>.prow>.pcard-full{grid-column:1/-1;grid-row:1}
@media(min-width:45rem){
 html body.home .pgrid>.prow>.pcard-l{grid-column:1;grid-row:1}
 html body.home .pgrid>.prow>.pcard-r{grid-column:2;grid-row:1;border-left:1px solid var(--grid-line)}
}
@media(min-width:62.5rem){
 html body.home .pgrid>.prow-wide-narrow{grid-template-columns:minmax(0,7fr) minmax(min(20rem,40%),3fr)}
 html body.home .pgrid>.prow-narrow-wide{grid-template-columns:minmax(min(20rem,40%),3fr) minmax(0,7fr)}
 html body.home .pgrid>.prow-half{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
 /* 60 / 40: a wide-narrow row whose narrow card needs more room (Optimize Design IP; DARPA's advanced packaging). */
 html body.home .pgrid>.prow-wide-narrow.prow-six-four{grid-template-columns:minmax(0,6fr) minmax(min(20rem,40%),4fr)}
}
@media(max-width:44.9375rem){
 html body.home .pgrid>.prow{grid-template-columns:minmax(0,1fr)}
 html body.home .pgrid>.prow>.pcard-r{border-top:1px solid var(--grid-line)}
}

/* Cards. */
html body.home .pgrid .pcard{position:relative;display:flex;flex-direction:column;gap:2.25rem;min-width:0;padding:var(--card-pad);scroll-margin-top:1rem;transition:background-color .2s ease;container-type:inline-size}
@media(min-width:45rem){html body.home .pgrid .pcard{min-height:clamp(20rem,14rem + 10vw,26rem)}}
@media(hover:hover){html body.home .pgrid .pcard:hover{background:color-mix(in srgb,var(--surface) 55%,transparent)}}
html body.home .pgrid .pcard:target::before{content:"";position:absolute;top:0;left:0;right:0;height:2px;background:var(--accent);pointer-events:none}
html body.home .pgrid .pglyph{flex:none;width:2.75rem;height:2.75rem;overflow:visible;fill:none;stroke:var(--ink-soft);stroke-width:1.25;stroke-linecap:square;stroke-linejoin:miter}
html body.home .pgrid .pglyph .acc{stroke:var(--accent)}
html body.home .pgrid .pglyph .pdots{fill:var(--ink-faint);stroke:none}
html body.home .pgrid .pbody{display:flex;flex-direction:column;align-items:flex-start;width:100%;max-width:38rem;margin-top:0;flex:1 0 auto;min-width:0}
html body.home .pgrid .ptitle{margin:0;font-family:var(--p-display);font-size:clamp(1.5rem,1.1rem + .85vw,2.125rem);font-weight:var(--display-weight,560);line-height:1.1;letter-spacing:var(--display-tracking,-.025em);text-transform:none;color:var(--ink);overflow-wrap:break-word;text-wrap:balance}
html body.home .pgrid .pblurb{max-width:36rem;margin:.875rem 0 0;font-family:var(--p-text);font-size:clamp(1rem,.95rem + .2vw,1.125rem);line-height:1.6;letter-spacing:-.005em;color:var(--ink-soft)}

html body.home .pgrid .pchips{display:flex;flex-wrap:wrap;gap:.375rem;margin:1.25rem 0 0;padding:0;list-style:none}
html body.home .pgrid .pchips li{padding:.3rem .55rem;border:1px solid var(--grid-line);font-family:var(--p-mono);font-size:.6875rem;font-weight:500;line-height:1.3;letter-spacing:.06em;text-transform:uppercase;color:var(--ink-soft)}
/* A term whose casing carries meaning (PnR) keeps it inside an upper-case chip. */
html body.home .pgrid .pchips .keepcase{text-transform:none;letter-spacing:inherit}

html body.home .pgrid .pactions{display:flex;flex-wrap:wrap;align-items:center;gap:0 1.5rem;margin-top:auto;padding-top:1.25rem}
html body.home .pgrid .plink{display:inline-block;padding-block:.6875rem;line-height:1.4;font-family:var(--p-text);font-size:.9375rem;font-weight:500;letter-spacing:-.005em;color:var(--ink);text-decoration:none}
html body.home .pgrid .plink:hover{color:var(--accent-ink)}
html body.home .pgrid .parrow{position:relative;left:0;color:var(--accent-ink);transition:left .2s ease}
html body.home .pgrid .plink:hover .parrow{left:3px}

/* Full-width card with media: text, then the video, then the actions (phones and tablets). From 1000px the card takes
   the row's columns as a subgrid: glyph, text and actions in the first column, the video in the second, so the
   video's left edge lines up with the content of the wide card in the row above. The text column is a size
   container, so its blurb follows the same narrow-card rule as the card above it. */
html body.home .pgrid .pcard-media>.pmedia{margin-top:0}
html body.home .pgrid .pcard-media>.pactions{margin-top:-.75rem;padding-top:0}
@media(min-width:62.5rem){
 /* container-type adds layout containment, which would stop the card being a subgrid. */
 html body.home .pgrid .pcard-media{container-type:normal;display:grid;grid-template-columns:subgrid;grid-template-rows:auto auto minmax(0,1fr);column-gap:calc(var(--card-pad) * 2);row-gap:0;align-content:stretch}
 html body.home .pgrid .pcard-media>:not(.pmedia){grid-column:1}
 html body.home .pgrid .pcard-media>.pglyph{grid-row:1}
 html body.home .pgrid .pcard-media>.pbody{grid-row:2;margin-top:2.25rem;container-type:inline-size}
 html body.home .pgrid .pcard-media>.pactions{grid-row:3;align-self:end;margin-top:0;padding-top:1.25rem}
 html body.home .pgrid .pcard-media>.pmedia{grid-column:2;grid-row:1/4;align-self:start}
 @supports not (grid-template-columns:subgrid){
  html body.home .pgrid .pcard-media{grid-template-columns:minmax(0,2fr) minmax(0,3fr)}
 }
}

/* Video: a click-to-load poster; YouTube loads only when played. */
html body.home .pgrid .pvideo{position:relative;width:100%;aspect-ratio:16/9;margin-top:1.5rem;overflow:hidden;border:1px solid var(--grid-line);background:#0b0c0b}
html body.home .pgrid .pvideo-play{display:block;width:100%;height:100%;padding:0;border:0;background:none;cursor:pointer}
html body.home .pgrid .pvideo img{display:block;width:100%;height:100%;object-fit:cover;object-position:50% 50%;opacity:.9;transition:opacity .2s ease}
html body.home .pgrid .pvideo-play:hover img{opacity:1}
html body.home .pgrid .pvideo-badge{position:absolute;left:.875rem;bottom:.875rem;display:inline-flex;align-items:center;gap:.5rem;padding:.5rem .8rem .5rem .65rem;background:#0b0c0b;color:#e8ebe5;font-family:var(--p-text);font-size:.8125rem;font-weight:500;letter-spacing:0;text-transform:none;transition:background-color .2s ease,color .2s ease}
html body.home .pgrid .pvideo-badge svg{width:.85rem;height:.85rem;fill:var(--accent)}
html body.home .pgrid .pvideo-play:is(:hover,:focus-visible) .pvideo-badge{background:var(--accent);color:#0b0c0b}
html body.home .pgrid .pvideo-play:is(:hover,:focus-visible) .pvideo-badge svg{fill:#0b0c0b}
html body.home .pgrid .pvideo-play:focus-visible{outline-offset:-4px}
html body.home .pgrid .pvideo iframe{display:block;width:100%;height:100%;border:0}

/* Steps: a short signal path; the last node is the outcome. (Not used on Products; kept for the other grid pages.) */
html body.home .pgrid .psteps{width:100%;margin:1.25rem 0 0;padding:0;list-style:none}
html body.home .pgrid .psteps li{position:relative;display:grid;grid-template-columns:5rem minmax(0,1fr);gap:.25rem 1rem;align-items:baseline;padding:.85rem 0 .85rem 1.5rem;border:0;border-top:1px solid var(--grid-line);color:var(--ink-soft)}
html body.home .pgrid .psteps li:last-child{border-bottom:1px solid var(--grid-line)}
html body.home .pgrid .psteps li::before{content:"";position:absolute;left:0;top:1.3rem;width:.5rem;height:.5rem;box-sizing:border-box;border:1px solid var(--ink-soft);border-radius:50%;background:var(--bg)}
html body.home .pgrid .psteps li:last-child::before{border-radius:0;border-color:var(--accent);background:var(--accent)}
html body.home .pgrid .psteps li:not(:last-child)::after{content:"";position:absolute;left:calc(.25rem - .5px);top:1.8rem;bottom:-1.3rem;width:1px;background:var(--grid-line)}
html body.home .pgrid .psteps b{font-family:var(--p-text);font-size:1rem;font-weight:600;letter-spacing:0;color:var(--ink)}
html body.home .pgrid .psteps span{font-family:var(--p-text);font-size:.9375rem;line-height:1.5}
@media(max-width:24rem){html body.home .pgrid .psteps li{grid-template-columns:minmax(0,1fr)}}

/* Signal wires along the grid's row lines: home.js draws a flat path on .prow, so the 1px row line is the wire
   and the pulse runs exactly on it (y=9 of the 18px wire sits on the border's centre). */
html body.home .pgrid>.prow>.section-wire{top:-9.5px}
html body.home .pgrid>.prow>.section-wire .wire-base{display:none}

/* T-junction branches (products.js): where a row line meets a vertical line below it, the pulse also runs down that
   line. One overlay per grid; it never takes pointer events and only ever draws on the 1px lines, which no text
   crosses. Colour follows the theme; width and opacity are copied from the row wire. */
html body.home .pgrid{position:relative}
html body.home .pgrid>.pbranches{position:absolute;inset:0;width:100%;height:100%;overflow:visible;pointer-events:none;fill:none}
html body.home .pgrid>.pbranches g{stroke:var(--accent);stroke-linecap:butt}
@media(prefers-reduced-motion:reduce){html body.home .pgrid>.pbranches{display:none}}

@media(max-width:44.9375rem){
 html body.products-page.home .products-intro{grid-template-columns:minmax(0,1fr)}
 html body.products-page.home .products-intro .lede{justify-self:start}
 html body.home .pgrid .pcard{gap:1.75rem}
}
@media(max-width:30rem){
 html body.home{--card-pad:1.25rem}
 html body.home .pgrid .pactions{gap:0 1.25rem}
}

/* Narrow cards (the 30% track at 1000-1199, or any card under ~350px): a tighter blurb keeps a good measure.
   Titles keep one size at every card width, so the product areas read as peers. */
@media(min-width:62.5rem){
 @container (max-width:22rem){
  html body.home .pgrid .pblurb{font-size:.96875rem;line-height:1.55}
 }
}
@media(min-width:62.5rem) and (max-width:74.9375rem){
 /* A 40% card (.prow-six-four) is wide enough to keep the full padding, so DARPA's packaging panel and the Work with
    us text below it keep one left edge. */
 html body.home .pgrid :is(.prow-wide-narrow:not(.prow-six-four)>.pcard-r,.prow-narrow-wide>.pcard-l){padding-inline:1.5rem}
 /* The video card's text column starts where the narrow card above it does. */
 html body.home .pgrid .prow-narrow-wide>.pcard-media{padding-left:1.5rem}
}
/* Two equal columns (720-999): a little less padding. */
@media(min-width:45rem) and (max-width:62.4375rem){
 html body.home{--card-pad:1.5rem}
}
/* No dangling single words. */
html body.home .pgrid :is(.pblurb,.psteps span){text-wrap:pretty}
html body.home .pgrid .plink{text-wrap:balance}
