/* ================================================================== */
/*  Deploy section — "Deploy your first sensors" block                 */
/*                                                                    */
/*  Layout:                                                           */
/*    desktop (≥961): 3 cols × 360px rows. col 1 = intro (rows 1-3). */
/*                    cols 2-3 = 6 cards, row-major.                  */
/*    mobile (<961):  2 cols, intro row 1 (span 2), cards rows 2-7    */
/*                    (each card spans both cols = full width).       */
/*                                                                    */
/*  Spacing inside card cells is cell PADDING, not card margin,       */
/*  so cards always fill their cell's content area. Top-row cells     */
/*  carry 135px padding-top to align cards with the intro headline.   */
/* ================================================================== */

/* --deploy-guide and --deploy-bg live in base.css :root — shared with
   legal.css and cta-section.css, which load on pages without this file. */
:root {
    --deploy-strong: var(--text);
    --deploy-body: var(--text-muted);
    --deploy-card: var(--bg-elevated);
}

/* ---------- Section shell ---------- */

.deploy-section {
    background: var(--deploy-bg);
    padding: 0 24px;
}

/* ---------- Grid ---------- */

.deploy-grid {
    position: relative;
    max-width: var(--container-max);
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    background: var(--deploy-bg);
    /* Subtle outer boundary. */
    border: 1px solid var(--deploy-guide);
}

@media (min-width: 961px) {
    .deploy-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        /* Row heights are asymmetric on purpose so that, once each row's
           top + bottom padding is subtracted, every card content area is
           the same 208px — all 6 product cards must stay equal height:
              (was: row 1 = 135 + 208 + 32 = 375 until 2026-09-28)
              row 2 =   0 + 208 + 32 = 240
              row 3 =   0 + 208 +  0 = 208
           Fixed on purpose (not auto/minmax) — letting a row grow to fit
           the intro column's translated text would inflate the height of
           just the two cards sharing that row and break the equal-height
           set. Give the intro more text-wrapping ROOM instead
           (.deploy-grid__bullets max-width below), not more row height.
        */
        /* Cards start flush with the top of the panel (owner, 2026-09-28):
              row 1 =   0 + 208 + 32 = 240
              row 2 =   0 + 208 + 32 = 240
              row 3 =   0 + 208 +  0 = 208 */
        grid-template-rows: 240px 240px 208px;
    }
}

/* ---------- Intro cell ---------- */

.deploy-grid__intro {
    grid-column: 1 / span 2;
    grid-row: 1;
    background: var(--deploy-card);
    padding: 70px 24px;
    display: flex;
    flex-direction: column;
    gap: 40px;
    border-bottom: 1px solid var(--deploy-guide);
}

@media (min-width: 601px) {
    .deploy-grid__intro { padding: 120px 40px; gap: 44px; }
}

@media (min-width: 961px) {
    .deploy-grid__intro {
        grid-column: 1;
        grid-row: 1 / span 3;
        padding: 72px 48px;
        border-right: 1px solid var(--deploy-guide);
        border-bottom: 0;
    }
}

.deploy-grid__head {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.deploy-grid__eyebrow {
    margin: 0;
    font-size: var(--fs-eyebrow);
    font-weight: var(--fw-semibold);
    letter-spacing: var(--ls-caps);
    text-transform: uppercase;
    color: var(--accent-amber);
}

.deploy-grid__title {
    margin: 0;
    max-width: 600px;
    font-size: var(--fs-h1);
    font-weight: var(--fw-semibold);
    overflow-wrap: break-word;
    line-height: var(--lh-heading);              /* 1.15 */
    letter-spacing: var(--ls-heading);           /* -0.02em */
    text-wrap: balance;
    background-image: var(--title-gradient);
    -webkit-background-clip: text;
            background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.deploy-grid__bullets {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-width: 40ch;
}
@media (min-width: 1025px) { .deploy-grid__bullets { gap: 24px; } }

.deploy-grid__bullets li {
    display: inline-block;
    font-size: var(--fs-lead);                   /* clamp(15px, 1.15vw, 17px) */
    line-height: var(--lh-body);
    color: var(--deploy-body);
}

/* Desktop: the intro column sits in fixed-height rows (see .deploy-grid)
   and is never wider than a third of the 1280px container, so the bullets
   must not grow with the viewport — cap the size and tighten the spacing
   so five two/three-line bullets stay inside in every language. */
@media (min-width: 961px) {
    .deploy-grid__bullets li { font-size: 16px; }
}
@media (min-width: 961px) and (max-width: 1339px) {
    .deploy-grid__bullets { gap: 12px; }
    .deploy-grid__bullets li { font-size: 15px; }
}
@media (min-width: 1200px) and (max-width: 1339px) {
    .deploy-grid__intro { padding: 44px 32px; }
}
@media (min-width: 1340px) {
    .deploy-grid__intro { padding-top: 56px; padding-bottom: 56px; }
    .deploy-grid__bullets { gap: 20px; }
}

.deploy-grid__bullets li svg {
    display: inline;
    vertical-align: middle;
    margin-right: 8px;
    transform: translateY(-1px);
    color: var(--brand);
}
.deploy-grid__bullets li strong {
    color: var(--deploy-strong);
    font-weight: var(--fw-regular);
}
[dir="rtl"] .deploy-grid__bullets li svg { margin-right: 0; margin-left: 8px; }

/* ---------- Card cell ---------- */
/*                                                                    */
/*  Cell carries the whitespace padding; card fills content area.     */
/*  display:flex so card's flex:1 rule grows it to fill the cell.     */

.deploy-grid__cell--card {
    display: flex;
    flex-direction: column;
    /* Mobile default: each card cell has 10px vertical + 16px horizontal
       padding so stacked cards breathe (20px gap between adjacent cards)
       and don't touch the grid's outer border. Reset to 0 on desktop. */
    padding: 10px 16px;
    background: var(--deploy-bg);
}

/* Extra top/bottom padding on the first / last card so they don't
   crowd the intro divider or the outer grid border. */
.deploy-grid__cell--card[data-idx="1"] { padding-top: 20px; }
.deploy-grid__cell--card[data-idx="6"] { padding-bottom: 20px; }

/* Mobile: each card cell spans both columns, intro is row 1, cards rows 2-7 */
.deploy-grid__cell--card { grid-column: 1 / span 2; }
.deploy-grid__cell--card[data-idx="1"] { grid-row: 2; }
.deploy-grid__cell--card[data-idx="2"] { grid-row: 3; }
.deploy-grid__cell--card[data-idx="3"] { grid-row: 4; }
.deploy-grid__cell--card[data-idx="4"] { grid-row: 5; }
.deploy-grid__cell--card[data-idx="5"] { grid-row: 6; }
.deploy-grid__cell--card[data-idx="6"] { grid-row: 7; }

@media (min-width: 961px) {
    /* Desktop: cards in cols 2-3, rows 1-3, COLUMN-major visual order:
       col 2 (left card column): SHM360 Node, Temp & Strength, Software
       col 3 (right card column): Strain, Dust, Strengthening (all PILOT) */
    .deploy-grid__cell--card[data-idx="1"] { grid-column: 2; grid-row: 1; }
    .deploy-grid__cell--card[data-idx="2"] { grid-column: 2; grid-row: 2; }
    .deploy-grid__cell--card[data-idx="3"] { grid-column: 2; grid-row: 3; }
    .deploy-grid__cell--card[data-idx="4"] { grid-column: 3; grid-row: 1; }
    .deploy-grid__cell--card[data-idx="5"] { grid-column: 3; grid-row: 2; }
    .deploy-grid__cell--card[data-idx="6"] { grid-column: 3; grid-row: 3; }

    /* Desktop overrides mobile padding.
       Default cell padding: 32px inside-edge gutters, flush with outer-edge. */
    .deploy-grid__cell--card        { padding: 0 0 32px 32px; }
    /* Top-row cells (data-idx 1 and 4): flush with the top of the panel. */
    .deploy-grid__cell--card[data-idx="1"],
    .deploy-grid__cell--card[data-idx="4"] { padding-top: 0; }
    /* Bottom-row cells (now data-idx 3 and 6): card flush with grid bottom */
    .deploy-grid__cell--card[data-idx="3"],
    .deploy-grid__cell--card[data-idx="6"] { padding-bottom: 0; }
}

/* ---------- Product card ---------- */

.product-card {
    flex: 1 1 auto;
    position: relative;
    display: flex;
    flex-direction: column;
    background: var(--deploy-card);
    border: 1px solid var(--deploy-guide);
    background-clip: padding-box;
    box-shadow: 0 1px 2px rgba(17, 24, 39, 0.04);
    /* NO overflow:hidden here — that was clipping the fold's border-right
       (positioned at top:-1), which is what cuts the card's top-right
       border corner.  The hero has its own overflow:hidden for the
       dashed lines, so the card itself doesn't need one. */
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    transition:
        box-shadow var(--dur-med) var(--ease-out),
        transform  var(--dur-med) var(--ease-out);
}

.product-card:hover {
    box-shadow:
        0 1px 2px rgba(17, 24, 39, 0.04),
        0 8px 24px -12px rgba(17, 24, 39, 0.15);
    transform: translateY(-1px);
}
.product-card:hover .product-card__hero { filter: contrast(97%); }
.product-card:focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: 2px;
}

/* ---------- Hero ---------- */

.product-card__hero {
    --line-color: var(--card-lc, var(--deploy-guide));
    position: relative;
    flex: 1 1 auto;
    /* All cards have a 208px budget; meta is ≈ 50px, so hero gets ≈ 158px.
       min-height just prevents the hero from collapsing if meta grows. */
    min-height: 120px;
    background: var(--card-bg, var(--deploy-card));
    transition: filter var(--dur-med) var(--ease-out);
    overflow: hidden;
}

/* Two horizontal dashed lines at top:32 / bottom:32 */
.product-card__hero > hr[data-orientation="horizontal"] {
    position: absolute;
    left: 0;
    right: 0;
    margin: 0;
    border: 0;
    height: 1px;
    background-image: linear-gradient(
        to right,
        var(--line-color) 0,
        var(--line-color) 50%,
        transparent 50%,
        transparent 100%
    );
    background-size: 5px 1px;
    background-repeat: repeat-x;
    pointer-events: none;
}
.product-card__hero > hr[data-orientation="horizontal"]:first-of-type { top: 32px; }
.product-card__hero > hr[data-orientation="horizontal"]:nth-of-type(2) { bottom: 32px; }

/* Four vertical dashed lines, flex-justify-between inside padding 0 50px */
.product-card__guides {
    position: absolute;
    inset: 0;
    padding: 0 50px;
    display: flex;
    flex-direction: row;
    align-items: stretch;
    justify-content: space-between;
    pointer-events: none;
}
.product-card__guides hr {
    margin: 0;
    border: 0;
    width: 1px;
    height: 100%;
    background-image: linear-gradient(
        to bottom,
        var(--line-color) 0,
        var(--line-color) 50%,
        transparent 50%,
        transparent 100%
    );
    background-size: 1px 5px;
    background-repeat: repeat-y;
}

/* Logo + ring — both direct children of hero, both centred via absolute
   positioning. */
.product-card__hero[data-icon="true"] > svg {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
    pointer-events: none;
    transition: transform var(--dur-med) var(--ease-out);
}
.product-card__icon {
    width: 32px;
    height: 32px;
    color: var(--card-fg, var(--brand));
}
.product-card__ring {
    color: var(--line-color);
}

.product-card:hover .product-card__icon {
    transform: translate(-50%, -50%) scale(1.08);
}

/* ---------- Meta ---------- */

.product-card__meta {
    padding: 16px;
    background: var(--deploy-card);
    border-top: 1px solid var(--deploy-guide);
    position: relative;
    z-index: 1;
}
.product-card__title {
    margin: 0;
    font-size: var(--fs-h4);                     /* 16px */
    font-weight: var(--fw-semibold);
    line-height: var(--lh-snug);
    letter-spacing: var(--ls-tight);
    color: var(--deploy-strong);
}
/* Narrow three-column layouts (tablet landscape, small laptops): long titles
   wrap to two lines and shrink that card's hero, so the six cards no longer
   match. Smaller title + a two-line box keeps every hero the same height. */
@media (min-width: 961px) and (max-width: 1199px) {
    .product-card__title {
        font-size: 14px;
        min-height: calc(2 * 14px * var(--lh-snug));
    }
    /* The intro column shares the fixed row heights; with narrower columns
       its bullets wrap more, so it gets less padding to stay inside. */
    .deploy-grid__intro { padding: 44px 32px; gap: 28px; }
}

/* ---------- Fold (top-right) — corner triangle ---------- */

.product-card__fold {
    --size: 33px;
    --color: var(--deploy-fold, rgba(255, 255, 255, 0.4));
    width: var(--size);
    height: var(--size);
    z-index: 2;
    border-bottom: var(--size) solid var(--color);
    border-right: var(--size) solid var(--deploy-bg);
    position: absolute;
    /* top/right = -1 so the border-right fully overlaps the card's 1px
       top + right borders at the corner, making them disappear. */
    top: -1px;
    right: -1px;
    pointer-events: none;
}

.product-card__fold > span {
    width: var(--size);
    height: calc(var(--size) + 1px);
    border: 1px solid var(--deploy-guide);
    z-index: 2;
    border-top: none;
    border-right: none;
    position: absolute;
    top: 0;
    left: 0;
    display: block;
    pointer-events: none;
}

.product-card__fold > span::after {
    content: "";
    background: var(--deploy-guide);
    height: var(--size);
    transform-origin: bottom;
    width: 1px;
    position: absolute;
    top: 0;
    right: -1px;
    transform: rotate(-45deg) scaleY(1.4);
    pointer-events: none;
}

[dir="rtl"] .product-card__fold {
    right: auto;
    left: -1px;
    border-right: 0;
    border-left: var(--size) solid var(--deploy-bg);
}
[dir="rtl"] .product-card__fold > span {
    left: auto;
    right: 0;
    border-left: none;
    border-right: 1px solid var(--deploy-guide);
}
[dir="rtl"] .product-card__fold > span::after {
    right: auto;
    left: -1px;
    transform: rotate(45deg) scaleY(1.4);
}

/* Corner badge (e.g. "PILOT ACCESS") — top-left so it doesn't collide with
   the fold decoration in the top-right corner. */
.product-card__badge {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 3;
    padding: 4px 8px;
    background: var(--accent-amber);
    color: #ffffff;
    font-family: var(--font-mono);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.10em;
    text-transform: uppercase;
    line-height: 1;
    border-radius: var(--radius-2xs);
    pointer-events: none;
    box-shadow: 0 2px 6px rgba(217, 119, 6, 0.30);
}
[dir="rtl"] .product-card__badge {
    left: auto;
    right: 10px;
}
