/* Services section — expanding horizontal panels (desktop).
   Applies only when services-panels.js has added .nl-panels to #services. One panel is open at a
   time: it grows wide and shows a photo beside the full content; the others shrink to narrow strips
   with a vertical title. Phones keep the original stacked cards. The generated bundle is not edited. */

@media (min-width: 901px) {
  html:root body #services.nl-panels .service-grid {
    display: flex !important;
    gap: 14px;
    height: 460px;
    grid-template-columns: none;
  }

  /* ---- panel ---- */
  html:root body #services.nl-panels .service-grid > .nl-service-card {
    --accent: 92, 200, 255;
    position: relative;
    flex: 1 1 0;
    min-width: 0;
    height: 100%;
    margin: 0;
    padding: 0;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, .08);
    background: #0a111d;
    overflow: hidden;
    clip-path: none !important;
    -webkit-mask-image: none !important;
    mask-image: none !important;
    filter: none;
    transform: none;
    cursor: pointer;
    transition: flex-grow .7s cubic-bezier(.65, 0, .25, 1), border-color .5s ease, box-shadow .5s ease;
  }
  html:root body #services.nl-panels .nl-service-card.service--design      { --accent: 92, 200, 255; }
  html:root body #services.nl-panels .nl-service-card.service--development { --accent: 255, 95, 174; }
  html:root body #services.nl-panels .nl-service-card.service--integration { --accent: 167, 139, 250; }

  html:root body #services.nl-panels .nl-service-card.is-open {
    flex-grow: 4.2;
    cursor: default;
    border-color: rgba(var(--accent), .35);
    box-shadow: 0 30px 70px -35px rgba(var(--accent), .55);
  }

  /* original decorative layers off */
  html:root body #services.nl-panels .nl-service-card > .underglow,
  html:root body #services.nl-panels .nl-service-card > .edge-glow,
  html:root body #services.nl-panels .nl-service-card > .shell,
  html:root body #services.nl-panels .nl-service-card > .fill,
  html:root body #services.nl-panels .nl-service-card > .lightbar,
  html:root body #services.nl-panels .nl-service-card > .corner-light,
  html:root body #services.nl-panels .nl-service-card > svg,
  html:root body #services.nl-panels .nl-service-card .divider,
  html:root body #services.nl-panels .nl-service-card .icon-ring,
  html:root body #services.nl-panels .nl-service-card .rule::before,
  html:root body #services.nl-panels .nl-service-card .rule::after,
  html:root body #services.nl-panels .nl-service-card .rule > * {
    display: none !important;
  }

  /* ---- photo: fills the strip when closed, the left part when open ---- */
  html:root body #services.nl-panels .nl-panel-media {
    position: absolute;
    inset: 0;
    z-index: 0;
    transition: right .7s cubic-bezier(.65, 0, .25, 1);
  }
  html:root body #services.nl-panels .nl-service-card.is-open .nl-panel-media { right: 52%; }
  html:root body #services.nl-panels .nl-panel-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    filter: grayscale(.85) brightness(.45);
    transform: scale(1.08);
    transition: filter .8s ease, transform 1.2s cubic-bezier(.2, .7, .2, 1);
  }
  html:root body #services.nl-panels .nl-service-card.is-open .nl-panel-media img {
    filter: none;
    transform: scale(1);
  }
  /* tint: strong on closed strips, a soft fade into the text side on the open panel */
  html:root body #services.nl-panels .nl-panel-media::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(10, 17, 29, .25), rgba(10, 17, 29, .92)),
                linear-gradient(0deg, rgba(var(--accent), .18), transparent 60%);
    transition: opacity .7s ease;
  }
  html:root body #services.nl-panels .nl-service-card.is-open .nl-panel-media::after {
    background: linear-gradient(90deg, transparent 55%, #0a111d 100%);
  }

  /* ---- closed strip label: number + vertical title ---- */
  html:root body #services.nl-panels .nl-panel-label {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: 26px 0;
    pointer-events: none;
    transition: opacity .35s ease .3s;
  }
  html:root body #services.nl-panels .nl-service-card.is-open .nl-panel-label {
    opacity: 0;
    transition: opacity .2s ease;
  }
  html:root body #services.nl-panels .nl-panel-num {
    font: 600 13px/1 var(--mono, ui-monospace, monospace);
    letter-spacing: .14em;
    color: rgba(var(--accent), 1);
  }
  html:root body #services.nl-panels .nl-panel-vtitle {
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    font: 700 20px/1 var(--display, inherit);
    letter-spacing: .14em;
    text-transform: uppercase;
    color: #eef4fb;
    white-space: nowrap;
  }
  html:root body #services.nl-panels .nl-panel-plus {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid rgba(var(--accent), .55);
    display: grid;
    place-items: center;
    color: rgba(var(--accent), 1);
    font-size: 18px;
    line-height: 1;
  }

  /* ---- content: right part of the open panel ---- */
  html:root body #services.nl-panels .nl-service-card > .content {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 48%;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    width: auto;
    margin: 0;
    padding: 40px 44px 36px 20px;
    text-align: left;
    opacity: 0;
    visibility: hidden;
    transform: translateX(24px);
    transition: opacity .25s ease, transform .25s ease, visibility 0s .25s;
  }
  html:root body #services.nl-panels .nl-service-card.is-open > .content {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: opacity .5s ease .45s, transform .6s cubic-bezier(.2, .7, .2, 1) .45s, visibility 0s .45s;
  }
  html:root body #services.nl-panels .nl-service-card > .content::before {
    content: attr(data-num);
    display: block;
    margin-bottom: 18px;
    font: 600 13px/1 var(--mono, ui-monospace, monospace);
    letter-spacing: .16em;
    color: rgba(var(--accent), 1);
  }
  html:root body #services.nl-panels .nl-service-card .title {
    position: static;
    margin: 0 0 18px;
    padding: 0;
    text-align: left;
    font-size: clamp(26px, 2.3vw, 36px);
    line-height: 1.05;
  }
  html:root body #services.nl-panels .nl-service-card .title a { color: #f4f8ff; text-decoration: none; }
  html:root body #services.nl-panels .nl-service-card .rule {
    position: static;
    display: block;
    width: 56px;
    height: 2px;
    margin: 0 0 22px;
    background: rgba(var(--accent), 1);
    opacity: 1;
    transform: none;
  }
  html:root body #services.nl-panels .nl-service-card .copy {
    position: static;
    max-width: 46ch;
    margin: 0 0 22px;
    padding: 0;
    text-align: left;
    color: #b3bfcf;
    font-size: 16px;
    line-height: 1.65;
  }
  html:root body #services.nl-panels .nl-service-card .service-scope {
    position: static;
    display: grid;
    gap: 10px;
    margin: 0 0 30px;
    padding: 0;
    list-style: none;
  }
  html:root body #services.nl-panels .nl-service-card .service-scope li {
    position: relative;
    margin: 0;
    padding-left: 18px;
    color: #d6deea;
    font-size: 14px;
  }
  html:root body #services.nl-panels .nl-service-card .service-scope li::before {
    content: '' !important;
    display: block !important;
    position: absolute;
    left: 0;
    top: .55em;
    width: 7px;
    height: 7px;
    border-radius: 2px;
    background: rgba(var(--accent), 1);
  }
  html:root body #services.nl-panels .nl-service-card .service-learn {
    position: static;
    display: inline-flex;
    align-items: center;
    gap: 14px;
    margin: 0;
    padding: 13px 20px;
    border: 1px solid rgba(var(--accent), .55);
    color: #f4f8ff;
    font: 600 12px/1 var(--display, inherit);
    letter-spacing: .16em;
    text-transform: uppercase;
    text-decoration: none;
    transition: background .3s ease, color .3s ease;
  }
  html:root body #services.nl-panels .nl-service-card .service-learn:hover,
  html:root body #services.nl-panels .nl-service-card .service-learn:focus-visible {
    background: rgba(var(--accent), 1);
    color: #07101c;
  }

  html:root body #services.nl-panels .nl-service-card .service-scope { margin-bottom: 18px; }
  html:root body #services.nl-panels .nl-service-card .service-ref { margin: 0 0 22px; }

  html:root body #services.nl-panels .services-swipe-hint { display: none; }
}

/* "Open-source reference · Dify ↗": an external project that shows the kind of work, clearly not our own */
html:root body #services .service-ref {
  position: static;
  margin: 0 0 18px;
  color: #8592a6;
  font: 500 12px/1.4 var(--mono, ui-monospace, monospace);
  letter-spacing: .06em;
}
html:root body #services .service-ref b {
  color: rgba(var(--accent, 120, 190, 255), 1);
  font-weight: 700;
}
