/* =============================================================
   Homepage: three-product grid + "old way / Pylon way" compare band
   Paired with /assets/js/home-compare.js
   ============================================================= */
:root {
  --x: 46%;
  --featw: clamp(176px, 14.2vw, 248px);
  --edge: calc(clamp(1rem, 2.6vw, 3.25rem) + var(--featw) + 2rem);
}

/* ---------- three products ---------- */

  .pgrid {
    margin-top: clamp(2.75rem, 5vw, 3.75rem);
    display: grid; grid-template-columns: repeat(3, 1fr);
    border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
  }
  .pcard {
    position: relative; display: flex; flex-direction: column;
    padding: clamp(1.9rem, 3vw, 2.6rem) clamp(1.4rem, 2.4vw, 2.1rem);
    border-right: 1px solid var(--border);
    transition: background 0.5s var(--ease);
  }
  .pcard:last-child { border-right: 0; }
  .pcard:hover { background: rgba(255,255,255,0.022); }
  /* a hairline in the product's own colour, drawn on approach */
  .pcard::before {
    content: ''; position: absolute; left: 0; right: 0; top: -1px; height: 1px; background: var(--pc);
    transform: scaleX(0); transform-origin: left; transition: transform 0.55s var(--ease);
  }
  .pcard:hover::before { transform: scaleX(1); }
  .pmark { width: 30px; height: 30px; display: block; }
  .pmark svg { width: 100%; height: 100%; display: block; }
  .pname { font-family: var(--font-d); font-size: clamp(1.25rem, 1.9vw, 1.4375rem); font-weight: 700;
           letter-spacing: -0.03em; color: var(--text); margin-top: 1.15rem; }
  .pdomain { font-family: var(--font-m); font-size: 0.625rem; letter-spacing: 0.16em; text-transform: uppercase;
             color: var(--pc); margin-top: 0.5rem; }
  .pdesc { font-size: 0.9375rem; line-height: 1.6; color: var(--text-2); margin-top: 1.05rem; max-width: 30ch; }
  .plink { margin-top: auto; padding-top: 1.75rem; display: inline-flex; align-items: center; gap: 0.45rem;
           font-family: var(--font-d); font-size: 0.8125rem; font-weight: 600; color: var(--text-3);
           transition: color 0.4s var(--ease); }
  .plink i { font-style: normal; transition: transform 0.4s var(--ease); }
  .pcard:hover .plink { color: #fff; }
  .pcard:hover .plink i { transform: translateX(3px); }
  .pcard:focus-visible { outline: 1px solid var(--text-3); outline-offset: -4px; }

  @media (max-width: 860px) {
    .pgrid { grid-template-columns: 1fr; }
    .pcard { border-right: 0; border-bottom: 1px solid var(--border); }
    .pcard:last-child { border-bottom: 0; }
    .pdesc { max-width: none; }
    .plink { padding-top: 1.25rem; }
  }

/* ---------- VIEW SWITCH ---------- */
  .views { display: flex; flex-wrap: wrap; gap: clamp(0.9rem, 2.1vw, 1.6rem); margin-top: clamp(2.25rem, 4vw, 2.9rem); border-bottom: 1px solid var(--border); }
  .view-btn { appearance: none; background: none; border: 0; cursor: pointer; padding: 0 0 0.85rem; position: relative;
              font-family: var(--font-d); font-size: 0.8125rem; font-weight: 600; letter-spacing: -0.012em; color: var(--text-4);
              transition: color 0.4s var(--ease); }
  .view-btn:hover { color: var(--text-2); }
  .view-btn.on { color: var(--text); }
  .view-btn::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: #fff;
                     transform: scaleX(0); transform-origin: left; transition: transform 0.5s var(--ease); }
  .view-btn.on::after { transform: scaleX(1); }
  .view-btn:focus-visible { outline: 1px solid var(--text-3); outline-offset: 5px; }

  /* ---------- FULL-BLEED BAND ---------- */
  .band { margin-top: clamp(2.25rem, 4vw, 3rem); }
  .split {
    position: relative; height: clamp(470px, 46vw, 580px); overflow: hidden;
    border-top: 1px solid rgba(255,255,255,0.08); border-bottom: 1px solid rgba(255,255,255,0.08);
    touch-action: pan-y; cursor: ew-resize; user-select: none;
  }
  .side { position: absolute; inset: 0; }
  .before { z-index: 1; background: linear-gradient(120deg, #cfcdc6 0%, #c2c0b9 100%); }
  .after { z-index: 2; background: linear-gradient(200deg, #101015 0%, #0a0a0d 70%); clip-path: inset(0 0 0 var(--x)); transition: clip-path 0.05s linear; }

  /* feature columns, DealRoom style */
  .feat { position: absolute; top: 50%; transform: translateY(-50%); width: var(--featw); }
  .feat-l { left: clamp(1rem, 2.6vw, 3.25rem); }
  .feat-r { right: clamp(1rem, 2.6vw, 3.25rem); }
  .feat-h { font-family: var(--font-d); font-size: clamp(1.25rem, 1.9vw, 1.6875rem); font-weight: 800; letter-spacing: -0.035em; line-height: 1.1; }
  .feat-h::before { content: ''; display: block; width: 34px; height: 3px; border-radius: 2px;
                    background: currentColor; margin-bottom: 0.95rem; }
  .feat-r .feat-h::before { margin-left: auto; }
  .feat-sub { font-size: 0.9375rem; margin-top: 0.5rem; line-height: 1.45; transition: opacity 0.3s var(--ease); }
  .feat-list { list-style: none; margin-top: clamp(1.35rem, 2.6vw, 1.95rem); display: flex; flex-direction: column; gap: clamp(0.85rem, 1.7vw, 1.2rem); }
  .feat-list b { display: block; font-family: var(--font-d); font-size: 0.8125rem; font-weight: 700; letter-spacing: -0.012em; }
  .feat-list span { display: block; font-size: 0.75rem; line-height: 1.5; margin-top: 0.18rem; }
  .feat-l .feat-h { color: #17171d; }
  .feat-l .feat-sub { color: #4a4a57; }
  .feat-l .feat-list b { color: #23232b; }
  .feat-l .feat-list span { color: #6e6e7a; }
  .feat-r { text-align: right; }
  .feat-r .feat-h { color: #fff; }
  .feat-r .feat-sub { color: #b9bac6; }
  .feat-r .feat-list b { color: #fff; }
  .feat-r .feat-list span { color: var(--text-3); }

  /* both artifacts run the full width, so the seam can travel edge to edge
     and each screenshot renders at near-native scale instead of a narrow slice */
  .art { position: absolute; inset: 0; padding-left: calc(var(--edge) + 16px); overflow: hidden;
         transition: opacity 0.28s var(--ease); display: flex; flex-direction: column; }
  .shotwrap { position: absolute; inset: 0; right: calc(var(--edge) + 44px); overflow: hidden; }
  /* the copy sits above the artifacts, on a scrim that fades them out behind it */
  .before::before, .after::before {
    content: ''; position: absolute; top: 0; bottom: 0; z-index: 2; pointer-events: none;
    width: calc(var(--edge) + 16px);
  }
  .before::before { left: 0; background: linear-gradient(90deg, rgba(206,204,197,0.985) 0%, rgba(206,204,197,0.965) 60%, rgba(206,204,197,0.72) 82%, rgba(206,204,197,0) 100%); }
  .after::before { right: 0; background: linear-gradient(270deg, rgba(10,10,13,0.98) 0%, rgba(10,10,13,0.96) 60%, rgba(10,10,13,0.72) 82%, rgba(10,10,13,0) 100%); }
  .feat { z-index: 3; }
  .shot { width: 100%; height: 100%; object-fit: cover; object-position: left top; display: block;
          transition: opacity 0.3s var(--ease), object-position 0.35s var(--ease); }

  /* --- spreadsheet --- */
  .sheet { background: #dcdcd8; }
  .sh-bar { display: flex; align-items: center; gap: 0.4rem; padding: 0.32rem 0.5rem; background: #cbcbc5; border-bottom: 1px solid #b0b0aa; flex: none; }
  .sh-name { font-family: var(--font-m); font-size: 0.5625rem; color: #55555c; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .sh-dot { width: 6px; height: 6px; border-radius: 50%; background: #a8a8a2; flex: none; }
  .sh-grid { flex: 1; overflow: hidden; display: grid; grid-auto-rows: 18px; align-content: start; }
  .sh-c { border-right: 1px solid #c3c3bd; border-bottom: 1px solid #c3c3bd; padding: 0 0.32rem;
          font-size: 0.625rem; line-height: 17px; color: #4d4d55; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .sh-c.ltr, .sh-c.num { background: #c9c9c3; color: #7a7a74; text-align: center; font-family: var(--font-m); font-size: 0.5rem; padding: 0; }
  .sh-c.hd { background: #e6e6e2; font-weight: 700; color: #3d3d44; font-size: 0.6094rem; }
  .sh-c.dim { color: #9a9a94; }
  .sh-c.bad { color: #a3453c; }
  .sh-c.flag { position: relative; }
  .sh-c.flag::after { content: ''; position: absolute; top: 0; right: 0; border-top: 5px solid #b5443a; border-left: 5px solid transparent; }
  .sh-c.g { background: #b6cdb1; color: #2c4c2d; }
  .sh-c.a { background: #ded09c; color: #63501c; }
  .sh-c.r { background: #dcb0aa; color: #742f27; }
  .sh-c.ttl { font-family: var(--font-d); font-weight: 800; font-size: 0.625rem; color: #2f2f36; background: #e6e6e2; letter-spacing: -0.01em; }
  .sh-c.sub { font-family: var(--font-m); font-size: 0.5rem; color: #8a8a90; background: #e6e6e2; }
  .sh-c.bar { font-family: var(--font-m); letter-spacing: -0.5px; color: #5b6b8a; }
  .sh-tab { flex: none; display: flex; align-items: flex-end; gap: 2px; padding: 0.24rem 0.5rem 0; background: #cbcbc5; border-top: 1px solid #b0b0aa; overflow: hidden; }
  .sh-tab span { font-family: var(--font-m); font-size: 0.5rem; white-space: nowrap; color: #4d4d55; background: #dcdcd8;
                 border: 1px solid #b9b9b3; border-bottom: 0; border-radius: 2px 2px 0 0; padding: 0.16rem 0.4rem; }
  .sh-tab span.off { background: #c0c0ba; border-color: #b0b0aa; color: #7e7e78; padding-top: 0.1rem; }

  /* --- file explorer --- */
  .files { background: #e9e7e2; }
  .fl-bar { display: flex; align-items: center; gap: 0.4rem; padding: 0.34rem 0.55rem; background: #dbd9d3; border-bottom: 1px solid #d6dae0; flex: none; }
  .fl-name { font-family: var(--font-d); font-size: 0.625rem; font-weight: 700; color: #3c4450; }
  .fl-crumb { flex: none; padding: 0.3rem 0.55rem; font-family: var(--font-m); font-size: 0.5rem; color: #8b93a0; border-bottom: 1px solid #e8eaee; }
  .fl-head, .fl-row { display: grid; grid-template-columns: 190px 58px 96px 1fr; gap: 0.4rem; padding: 0 0.55rem; align-items: center; }
  .fl-head { flex: none; height: 20px; border-bottom: 1px solid #e2e5ea; font-family: var(--font-m); font-size: 0.4688rem;
             letter-spacing: 0.08em; text-transform: uppercase; color: #9aa2ae; }
  .fl-list { flex: 1; overflow: hidden; }
  .fl-row { height: 22px; border-bottom: 1px solid #f0f1f4; font-size: 0.5938rem; color: #38404b; }
  .fl-n { display: flex; align-items: center; gap: 0.38rem; min-width: 0; }
  .fl-n svg { width: 12px; height: 12px; flex: none; }
  .fl-n span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .fl-row i { font-style: normal; color: #98a0ac; font-size: 0.5625rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .fl-row i.old { color: #b4635a; }
  .fl-foot { flex: none; padding: 0.26rem 0.55rem; background: #eceff3; border-top: 1px solid #d6dae0;
             font-family: var(--font-m); font-size: 0.4688rem; color: #8b93a0; }

  /* --- slide deck --- */
  .deck { background: #c3c1bb; }
  .dk-bar { display: flex; align-items: center; gap: 0.4rem; padding: 0.32rem 0.5rem; background: #c2c2be; border-bottom: 1px solid #adada9; flex: none; }
  .dk-name { font-family: var(--font-m); font-size: 0.5625rem; color: #55555c; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .dk-dot { width: 6px; height: 6px; border-radius: 50%; background: #a0a09c; flex: none; }
  .dk-body { flex: 1; display: flex; min-height: 0; }
  .dk-rail { width: 44px; flex: none; background: #c8c8c4; padding: 5px; display: flex; flex-direction: column; gap: 5px; overflow: hidden; }
  .dk-th { height: 25px; flex: none; background: #fbfbf9; border: 1px solid #b0b0ac; }
  .dk-th.on { outline: 2px solid #c8823a; outline-offset: -1px; }
  .dk-slide { flex: 1; margin: 9px; background: #eceae4; padding: 0.75rem 0.85rem; display: flex; flex-direction: column; min-width: 0; box-shadow: 0 1px 4px rgba(0,0,0,0.18); }
  .dk-h { font-family: var(--font-d); font-size: 0.8125rem; font-weight: 700; color: #2b2b31; letter-spacing: -0.01em; }
  .dk-sub { font-size: 0.5rem; color: #8a8a90; margin-top: 0.15rem; font-family: var(--font-m); }
  .dk-q { display: grid; grid-template-columns: repeat(4, 1fr); gap: 3px; margin-top: 0.6rem; }
  .dk-q i { font-family: var(--font-m); font-size: 0.4375rem; color: #9a9aa0; text-align: center; border-bottom: 1px solid #d8d8d4; padding-bottom: 2px; font-style: normal; }
  .dk-rows { margin-top: 5px; display: flex; flex-direction: column; gap: 4px; }
  .dk-row { height: 11px; position: relative; }
  .dk-row b { position: absolute; top: 0; height: 100%; border-radius: 1px; font-weight: 400;
              font-size: 0.4375rem; color: #fff; line-height: 11px; padding: 0 3px; overflow: hidden; white-space: nowrap; }
  .dk-foot { flex: none; padding: 0.24rem 0.6rem; background: #c2c2be; border-top: 1px solid #adada9;
             font-family: var(--font-m); font-size: 0.4688rem; color: #6e6e76; }

  /* --- legacy GRC tool --- */
  .grc { background: #dcdee2; }
  .gr-top { flex: none; display: flex; align-items: center; gap: 0.5rem; padding: 0.34rem 0.6rem; background: #20486e; }
  .gr-brand { font-family: var(--font-d); font-size: 0.5625rem; font-weight: 700; color: #eaf1f8; }
  .gr-user { margin-left: auto; font-family: var(--font-m); font-size: 0.4688rem; color: #a8c4de; white-space: nowrap; }
  .gr-tabs { flex: none; display: flex; background: #dfe5ec; border-bottom: 1px solid #b9c3cf; }
  .gr-tab { font-family: var(--font-m); font-size: 0.5rem; color: #55636f; padding: 0.24rem 0.55rem; border-right: 1px solid #c6ced8; }
  .gr-tab.on { background: #fff; color: #20486e; font-weight: 500; }
  .gr-alert { flex: none; background: #fdf3d4; border-bottom: 1px solid #e3d08a; color: #7a5c1e;
              padding: 0.26rem 0.6rem; font-family: var(--font-m); font-size: 0.4688rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .gr-grid { flex: 1; overflow: hidden; display: grid; grid-auto-rows: 19px; align-content: start; background: #eceef1; }
  .gr-c { border-bottom: 1px solid #dde3ea; border-right: 1px solid #edf1f5; padding: 0 0.34rem;
          font-size: 0.6094rem; line-height: 18px; color: #3f4b57; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .gr-c.hd { background: #e7ecf2; font-weight: 700; font-size: 0.5rem; color: #38506a; font-family: var(--font-m); letter-spacing: 0.04em; text-transform: uppercase; }
  .gr-c.dim { color: #9aa5b1; }
  .gr-c.bad { color: #a3453c; }
  .gr-foot { flex: none; padding: 0.24rem 0.6rem; background: #dfe5ec; border-top: 1px solid #b9c3cf;
             font-family: var(--font-m); font-size: 0.4375rem; color: #6a7684; display: flex; gap: 0.9rem; }

  /* the seam */
  .handle { position: absolute; top: 0; bottom: 0; left: var(--x); width: 1px; z-index: 5;
            background: linear-gradient(180deg, rgba(255,255,255,0) 0%, rgba(160,166,200,0.5) 10%, rgba(160,166,200,0.5) 90%, rgba(255,255,255,0) 100%);
            transition: left 0.05s linear; }
  .handle::before { content: ''; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
                    width: 36px; height: 36px; border-radius: 50%; background: #fff;
                    box-shadow: 0 4px 16px rgba(20,22,40,0.28), 0 0 0 1px rgba(20,22,40,0.08); }
  .handle::after { content: ''; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 13px; height: 7px;
                   background: linear-gradient(90deg, #4a4f66 0 2px, transparent 2px 5.5px, #4a4f66 5.5px 7.5px, transparent 7.5px 11px, #4a4f66 11px 13px); }
  .split.revealing .after, .split.revealing .handle {
    transition: clip-path 2.7s cubic-bezier(0.22, 1, 0.36, 1), left 2.7s cubic-bezier(0.22, 1, 0.36, 1);
  }
  .hint { text-align: center; font-family: var(--font-m); font-size: 0.625rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-4); margin-top: 0.9rem; }

  .caption { margin-top: 2rem; display: flex; align-items: baseline; gap: 1rem; }
  .caption-rule { width: 26px; height: 1px; flex: none; margin-top: 0.75rem; background: rgba(255,255,255,0.5); }
  .caption-tx { font-size: clamp(1rem, 1.35vw, 1.125rem); color: var(--text-2); line-height: 1.6; max-width: 680px; }
  .caption-tx b { color: var(--text); font-weight: 600; }

  /* below 1200 there is no room for the copy columns; artifacts take the halves */
  @media (max-width: 1200px) {
    .feat { display: none; }
    .before::before, .after::before { display: none; }
    .art { padding-left: 0; }
  }
  /* Mobile: no seam, no tabs, one story. The dashboard is cropped to a legible
     detail instead of shrinking a 3000px screenshot down to an unreadable smear. */
  @media (max-width: 860px) {
    .views { display: none; }
    /* DealRoom's mobile order: label, then the artifact, then the bullets */
    .side { display: flex; flex-direction: column; }
    .feat { display: contents; }
    .feat-h { order: 1; padding: clamp(1.6rem, 6vw, 2.2rem) clamp(1.25rem, 5vw, 2rem) 0; }
    .feat-sub { order: 2; padding: 0 clamp(1.25rem, 5vw, 2rem); margin-top: 0.45rem; }
    .art, .shotwrap { order: 3; margin-top: clamp(1.4rem, 5vw, 1.9rem); }
    .feat-list { order: 4; padding: clamp(1.4rem, 5vw, 1.9rem) clamp(1.25rem, 5vw, 2rem) clamp(1.75rem, 6vw, 2.4rem); margin-top: 0; }
    .feat-h { font-size: clamp(1.5rem, 7vw, 1.875rem); }
    .feat-r, .feat-r .feat-h::before { text-align: left; margin-left: 0; }
    .split { height: auto; cursor: default; display: flex; flex-direction: column; }
    .side { position: relative; inset: auto; }
    .after { clip-path: none !important; }
    .art, .shotwrap { position: relative; width: 100%; inset: auto; right: auto; box-shadow: none; }
    .art { height: 360px; }
    /* the whole screenshot, scaled to fit. small, but honest and undistorted */
    .shotwrap { height: auto; }
    .shot { width: 100%; height: auto; max-width: 100%; object-fit: contain;
            margin: 0; display: block; }
    .handle, .hint { display: none; }
  }
