/* Logistics Made Simple: styles for the app pages only (/apps, /apps/clearvi3w, /apps/load-planner, /apps/yard-planner).
   Loaded after css/site.css. Colours come from the section surface (site.css section 3), so these rules
   name var(--fg), var(--rule), var(--accent-text) and so on, never a fixed text colour.

   Contents
    1  Shared: the desktop frame bar, the app icon, the "Demo company" tag in a section head
    2  /apps: the app list (ClearVi3w featured, then LoadVi3w and YardVi3w)
    3  /apps/clearvi3w: the lead picture in the hero, "We don't just advise", modules, connects, gallery head, plans
    4  Coming soon pages: what it does, the screens, the YardVi3w "Screens coming soon" notice (closing band is the shared .cta-band)
    5  Read-outs: short labels lifted from the real screen beside it
    6  Motion: the real screens settle into place as the page scrolls (no script) */


/* ===== 1. Shared ===== */

/* A desktop screen in a window: a thin bar with three squares above the picture (decoration only).
   <a class="shot-link appshot appshot--bar" …> */
.appshot--bar, .gallery .shot-link.appshot:not(.appshot--phone), .teaser a.appshot:not(.appshot--phone) { padding-top: 26px; background: var(--ink-2); }
.appshot--bar::before, .gallery .shot-link.appshot:not(.appshot--phone)::before, .teaser a.appshot:not(.appshot--phone)::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 26px; border-bottom: 1px solid var(--ink-line-2); pointer-events: none;
  background:
    linear-gradient(var(--signal), var(--signal)) 12px 50% / 7px 7px no-repeat,
    linear-gradient(#4A4F59, #4A4F59) 25px 50% / 7px 7px no-repeat,
    linear-gradient(#4A4F59, #4A4F59) 38px 50% / 7px 7px no-repeat; }
.appshot--light.appshot--bar, .teaser a.appshot--light:not(.appshot--phone) { background: #E4E0D6; }
.appshot--light.appshot--bar::before, .teaser a.appshot--light:not(.appshot--phone)::before { border-bottom-color: var(--paper-line);
  background:
    linear-gradient(var(--on-light-mark), var(--on-light-mark)) 12px 50% / 7px 7px no-repeat,
    linear-gradient(#B9B2A2, #B9B2A2) 25px 50% / 7px 7px no-repeat,
    linear-gradient(#B9B2A2, #B9B2A2) 38px 50% / 7px 7px no-repeat; }

/* Phone frames: a little squarer to sit with the square corners everywhere else. */
.appshot--phone { border-radius: 26px; }
.appshot--phone img { border-radius: 19px; }
a.appshot--phone:focus-visible { outline-offset: 5px; }

/* Square app icon (CV, LV, YV) */
.app-icon { display: grid; place-items: center; flex: none; width: 48px; height: 48px; border: 1px solid var(--rule-strong); color: var(--fg);
  font: 800 15px/1 var(--font-display); font-stretch: 125%; letter-spacing: .02em; }
.app--feature .app-icon { background: var(--signal); border-color: var(--signal); color: var(--ink); }

/* A "Demo company" tag at the end of a section head stays visible on phones (the plain tag hides there). */
.sec-head > .demo-tag { flex: none; white-space: nowrap; }

/* Dot before a module name */
.module h3 { display: flex; align-items: flex-start; gap: 12px; }
.module .dot { flex: none; width: 8px; height: 8px; margin-top: .45em; background: var(--signal-mark); }


/* ===== 2. /apps: the app list ===== */
.apps { list-style: none; margin: 0; padding: 0; display: grid; gap: 20px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 768px) { .apps { grid-template-columns: repeat(2, minmax(0, 1fr)); } .app--feature { grid-column: 1 / -1; } }
@media (min-width: 1024px) { .apps { gap: 24px; } }

.app.card { display: flex; flex-direction: column; padding: 0; overflow: hidden; min-width: 0; }
.app-body { display: flex; flex-direction: column; flex: 1 1 auto; padding: 28px 24px 24px; }
@media (min-width: 768px) { .app-body { padding: 36px 32px 28px; } }
.app-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 12px; margin-bottom: 24px; }
.app-title { margin: 0 0 12px; font: 800 clamp(26px, 1rem + 1.4vw, 36px)/1 var(--font-display); font-stretch: 125%; letter-spacing: -0.015em; text-transform: uppercase; }
.app-headline { margin: 0 0 14px; font: italic 400 clamp(20px, 1rem + .5vw, 24px)/1.25 var(--font-serif); color: var(--accent-text); }
.app-body .muted { margin-bottom: 16px; }
.app-who { font-size: 15px; line-height: 1.5; color: var(--fg-2); padding-top: 16px; border-top: 1px solid var(--rule); }
.app-who b { color: var(--fg); }
.app-body .card-link { margin-top: auto; padding-top: 8px; align-self: flex-start; }
/* The link that carries the app name: the name may wrap, the arrow follows it. */
.card-link:has(.app-name) { display: block; line-height: 1.4; padding-top: 18px; padding-bottom: 10px; }
.card-link:has(.app-name)::after { display: inline-block; vertical-align: -3px; margin-left: 10px; }
.apps-more { margin: 32px 0 0; font: 500 12px/1.5 var(--font-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--fg-3); display: flex; align-items: center; gap: 12px; }
.apps-more::before { content: ""; flex: none; width: 8px; height: 8px; border: 1.5px solid var(--signal-mark); }

/* The picture area at the top of each card: a crop of the real screen on a raised panel with a faint grid. */
.app-media { position: relative; margin: 0; padding: 24px 24px 0; overflow: hidden; border-bottom: 1px solid var(--card-line); background: var(--paper-2);
  background-image: linear-gradient(rgba(14,15,17,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(14,15,17,.05) 1px, transparent 1px); background-size: 32px 32px; background-position: -1px -1px; }
@media (min-width: 768px) { .app-media { padding: 32px 32px 0; } }
.app-media .app-shot { aspect-ratio: 16 / 10; border-bottom: 0; box-shadow: none; }
.app-media .app-shot img { position: absolute; max-width: none; height: auto; }
.app-media .app-shot--lv img { width: 150%; left: -48.75%; top: -33%; }
.app-media .demo-tag { position: absolute; left: 0; bottom: 0; z-index: 2; padding: 8px 12px; background: var(--ink); color: #C9C7C0; border-top: 1px solid var(--ink-line-2); border-right: 1px solid var(--ink-line-2); }

/* ClearVi3w, featured: an ink panel, the picture beside the words from 1024. */
.app--feature .app-media { background-color: var(--ink-2); border-color: var(--ink-line);
  background-image: linear-gradient(rgba(242,239,231,.045) 1px, transparent 1px), linear-gradient(90deg, rgba(242,239,231,.045) 1px, transparent 1px); }
.app--feature .app-shot--cv { aspect-ratio: 16 / 9; }
.app--feature .app-shot--cv img { width: 132%; left: -21%; top: -21%; }
.app--feature .app-phone { position: absolute; z-index: 1; right: 20px; bottom: 0; width: clamp(92px, 24%, 150px); margin: 0; padding: 5px; border-radius: 20px 20px 0 0; border-bottom: 0;
  aspect-ratio: 780 / 1300; overflow: hidden; box-shadow: 0 0 0 1px rgba(0,0,0,.5), -18px 0 40px -10px rgba(0,0,0,.8); }
.app--feature .app-phone img { border-radius: 15px 15px 0 0; }
@media (min-width: 1024px) {
  .app.app--feature { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
  .app--feature .app-media { padding: 56px 0 0 56px; border-bottom: 0; border-right: 1px solid var(--ink-line); display: flex; align-items: flex-end; }
  .app--feature .app-media > .app-shot { flex: 1 1 auto; aspect-ratio: auto; height: 100%; min-height: 420px; border-right: 0; }
  .app--feature .app-shot--cv img { width: 150%; left: -24%; top: -9%; }
  .app--feature .app-phone { right: 40px; width: clamp(120px, 24%, 168px); }
  .app--feature .app-body { padding: 48px 48px 40px; justify-content: center; }
  .app--feature .app-title { font-size: clamp(36px, 1rem + 2vw, 56px); }
}

/* YardVi3w has no screens yet. A notice set in type and rules only (also used on its own page):
   the app's name on a rule, then "Screens coming soon" in the headline faces. No drawing, no frame,
   nothing shaped like a screen, so it cannot be read as a picture of the product. */
.soon-panel { display: flex; flex-direction: column; justify-content: space-between; gap: 32px; aspect-ratio: 16 / 10; padding: clamp(20px, 5%, 40px);
  background: var(--ink); color: var(--paper); border: 1px solid var(--ink-line-2); border-top: 3px solid var(--signal); container-type: inline-size; }
.soon-panel p { margin: 0; }
/* Two classes each, so the card rule for paragraphs (.card p) does not grey them. */
.soon-panel .soon-panel__name { display: flex; align-items: center; gap: 16px; font: 600 12px/1 var(--font-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--signal); }
.soon-panel .soon-panel__name::after { content: ""; flex: 1 1 auto; height: 1px; background: var(--ink-line-2); }
.soon-panel .soon-panel__big { padding-top: 20px; border-top: 1px solid var(--ink-line-2);
  font: 800 clamp(26px, 9.5cqi, 72px)/.98 var(--font-display); font-stretch: 125%; letter-spacing: -0.02em; text-transform: uppercase; color: var(--paper); }
.soon-panel__big .display-serif { display: block; color: var(--signal); }
.app-media > .soon-panel { border-bottom: 0; }


/* ===== 3. /apps/clearvi3w ===== */

/* The lead picture sits in the hero, under the buttons: the board, with the driver phone over its corner. */
.lead { margin: clamp(48px, 7vw, 88px) 0 0; }
.lead-stage { position: relative; }
.lead .lead-phone { display: none; }
.lead-note { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 20px; margin-top: 16px; }
.lead-note .frame-note { margin: 0; }
@media (min-width: 768px) {
  .lead-stage { padding-bottom: 40px; margin-right: 6%; }
  .lead .lead-phone { display: block; position: absolute; right: -6%; bottom: 0; width: clamp(128px, 17%, 200px); padding: 6px;
    box-shadow: 0 0 0 1px rgba(0,0,0,.5), -24px 32px 64px -12px rgba(0,0,0,.9); }
  .lead-note { margin-top: -14px; max-width: 74%; }
}

/* 01 We don't just advise. We build. */
.proof-split { display: grid; gap: 32px 64px; }
.proof-split .display-l { margin: 0; }
.proof-copy .lede { max-width: 560px; }
.proof-copy .checks { margin-top: 32px; padding-top: 28px; border-top: 1px solid var(--rule); }
@media (min-width: 1024px) { .proof-split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: end; } }

/* 02 Modules: five with a picture (the board wide), then three plain */
.mods-tag { margin: 16px 0 0; line-height: 1; }
.mods { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
.mod.card { display: flex; flex-direction: column; padding: 0; overflow: hidden; min-width: 0; }
.mod-text { padding: 28px 24px 24px; }
.mod-text h3 { margin-bottom: 10px; }
.mod-text p { margin: 0; }
.mod-shot, .mod-phones { position: relative; display: block; margin-top: auto; aspect-ratio: var(--ratio, 16 / 10); overflow: hidden; border-top: 1px solid var(--card-line); background: var(--ink); }
.mod-shot img { position: absolute; left: var(--x, 0%); top: var(--y, 0%); width: var(--zoom, 100%); max-width: none; height: auto; transition: transform .4s var(--ease); transform-origin: 30% 30%; }
.mod-shot:hover img { transform: scale(1.025); }
.mod-shot:focus-visible { outline: 3px solid var(--focus); outline-offset: -3px; }
.mod-shot::after { content: ""; position: absolute; inset: 0; pointer-events: none; box-shadow: inset 0 0 0 0 var(--signal-mark); transition: box-shadow .15s; }
.mod-shot:hover::after { box-shadow: inset 0 3px 0 0 var(--signal-mark); }
.mod-shot--board { --zoom: 120%; --x: -19.6%; --y: -15.2%; --ratio: 1.56; }
.mod-shot--plan { --zoom: 120%; --x: -19.6%; --y: -15.6%; }
.mod-shot--shop { --zoom: 120%; --x: -19.4%; --y: 0%; }
.mod-phones { display: flex; justify-content: center; align-items: flex-start; gap: 7%; padding: 7% 8% 0;
  background-color: var(--ink-2); background-image: linear-gradient(rgba(242,239,231,.045) 1px, transparent 1px), linear-gradient(90deg, rgba(242,239,231,.045) 1px, transparent 1px); background-size: 24px 24px; }
.mod-phones .appshot--phone { flex: 0 1 33%; min-width: 0; border-radius: 20px; padding: 5px; }
.mod-phones .appshot--phone img { border-radius: 15px; }
.mods-rest.grid { margin-top: 16px; gap: 16px; }
@media (min-width: 768px) {
  .mods { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mod--wide { grid-column: 1 / -1; }
  .mod-text { padding: 32px 28px 28px; }
  .mods-rest.grid { grid-template-columns: minmax(0, 1fr); }
}
@media (min-width: 900px) { .mods-rest.grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1024px) {
  .mods, .mods-rest.grid { gap: 20px; }
  .mods-rest.grid { margin-top: 20px; }
  .mod.mod--wide { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); }
  .mod--wide .mod-text { align-self: end; padding: 40px 36px; }
  .mod--wide .mod-text h3 { font-size: clamp(24px, 1rem + .9vw, 32px); }
  .mod--wide .mod-shot { margin-top: 0; border-top: 0; border-left: 1px solid var(--card-line); }
}

/* 03 Connects */
.connects-h { max-width: 22ch; margin-bottom: clamp(40px, 5vw, 64px); }
.connects .title-m { margin-bottom: 12px; }
.connects p { margin: 0; }

/* 04 See it in action */
#see-it .head-split { align-items: end; }
.see-tap { margin: 0; font: 500 12px/1.5 var(--font-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--fg-3); }
.demo-note { padding: 24px; }
.demo-note .muted { font-size: 16px; line-height: 1.55; }
#see-it .gallery { margin-top: 0; }
/* Two screens not shown above (Fleet Command, the Linehaul board): side by side from 768. */
#see-it .gallery--pair { grid-template-columns: minmax(0, 1fr); }
#see-it .gallery--pair > .shot:first-child { grid-column: auto; }
@media (min-width: 768px) {
  #see-it .gallery--pair { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px 24px; }
  #see-it .gallery--pair > .shot, #see-it .gallery--pair > .shot:first-child { grid-column: auto; }
}
@media (min-width: 1024px) { #see-it .gallery--pair { gap: 56px 32px; } }
.gallery .shot figcaption, .teaser figcaption { padding-top: 12px; border-top: 1px solid var(--rule); }

/* Plans: four ruled columns with an accent line on top */
.plans { margin-top: clamp(56px, 7vw, 96px); padding-top: 32px; border-top: 1px solid var(--rule-strong); }
.plans > .mono-label { margin-bottom: 10px; }
.plans > .muted { margin: 0; }
.plans-grid { display: grid; gap: 28px 24px; grid-template-columns: minmax(0, 1fr); margin-top: 32px; }
@media (min-width: 600px) { .plans-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .plans-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.plan-head { display: grid; gap: 8px; align-content: start; border-top: 3px solid var(--signal-mark); padding-top: 18px; scroll-margin-top: 96px; }
.plan-head h3 { margin: 0; font: 800 clamp(22px, 1rem + .7vw, 28px)/1.05 var(--font-display); font-stretch: 125%; text-transform: uppercase; letter-spacing: -0.01em; }
.plan-head .small { margin: 0; color: var(--fg-2); }
#see-it .plans + .btn-row { margin-top: 48px; }


/* ===== 4. Coming soon pages ===== */
.page-hero .eyebrow-row .chip { letter-spacing: .1em; }

/* What it does: three ruled columns, each a mono number over a short line */
.points { list-style: none; margin: 0; padding: 0; }
.point { display: grid; gap: 16px; align-content: start; font: 700 clamp(19px, 1rem + .6vw, 25px)/1.25 var(--font-display); letter-spacing: -0.005em; color: var(--fg); overflow-wrap: break-word; }
.point .mono-num { font-size: 12px; }

/* The screens */
.teasers { display: grid; gap: 32px 20px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 760px) { .teasers { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.teaser { margin: 0; display: grid; gap: 14px; align-content: start; min-width: 0; }
.teaser figcaption { font-size: 15px; line-height: 1.5; color: var(--fg-2); }
.teasers.teasers--shots { gap: 40px 24px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 760px) {
  .teasers.teasers--shots { grid-template-columns: minmax(0, 3.2fr) minmax(0, 1fr); align-items: end; }
  .teasers--shots .teaser--wide { grid-column: 1 / -1; }
}
@media (min-width: 1024px) { .teasers.teasers--shots { gap: 56px 32px; } }
.teaser-pair { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 600px) { .teaser-pair { gap: 24px; grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.teaser--phone { justify-items: center; }
.teaser--phone .appshot--phone { width: 100%; max-width: 260px; }
.teaser--phone figcaption { justify-self: stretch; }
.sec--ink .appshot--light { border-color: var(--ink-line-2); }
.sec--ink .fineprint { margin-top: 32px; padding-top: 16px; border-top: 1px solid var(--rule); }

/* YardVi3w: the "Screens coming soon" notice, with the three screens to come listed beside it */
.yard-soon { display: grid; gap: 32px; grid-template-columns: minmax(0, 1fr); align-items: center; }
.yard-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.yard-list li { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 12px; align-items: baseline; padding: 18px 0; border-bottom: 1px solid var(--rule);
  font: 700 clamp(18px, 1rem + .4vw, 22px)/1.3 var(--font-display); color: var(--fg); overflow-wrap: break-word; }
.yard-list .mono-num { font-size: 12px; }
.yard-soon .fineprint { margin-top: 24px; padding-top: 0; border-top: 0; }
@media (min-width: 900px) { .yard-soon { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 48px; } }
@media (min-width: 1024px) { .yard-soon { gap: 64px; } }


/* ===== 5. Read-outs =====
   A short row of labels and figures copied exactly from the real screenshot beside it (demo company, made-up data).
   <div class="readout"><p class="readout__label">On this screen</p><ul class="readout__list"><li>Units <b>15</b></li>…</ul></div> */
.readout { display: grid; gap: 12px; margin: 28px 0 0; min-width: 0; }
.readout__label { display: flex; align-items: center; gap: 10px; margin: 0; font: 600 11px/1.4 var(--font-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--fg-3); }
.readout__label::before { content: ""; flex: none; width: 6px; height: 6px; background: var(--signal-mark); }
.readout__list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.readout__list li { padding: 7px 10px; border: 1px solid var(--rule); font: 400 13px/1.35 var(--font-mono); color: var(--fg-2); min-width: 0; overflow-wrap: anywhere; }
.readout__list b { font-weight: 600; color: var(--fg); }
.teaser > .readout { margin: 0; }
@media (min-width: 768px) {
  .readout { grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 12px 20px; }
  .lead + .readout { margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--rule); }
}


/* ===== 6. Motion =====
   The real screens ease into place as they scroll into view: the picture starts a touch large inside its frame
   and settles to its true size; a phone rises the last few pixels to its spot. The browser ties it to the scroll
   position, so there is no script. The frame keeps its size and clips the picture, so nothing around it moves.
   Browsers without scroll-driven animation, and visitors who ask for reduced motion, get the still, finished layout.
   "scale" and "translate" are used (not "transform") so the hover and reveal transforms are left alone.
   overflow: clip (not hidden) on the frames, so the browser measures against the page's own scroll. */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .cv-hero, .appshot:not(.appshot--phone), .app.card, .mod.card, .app-media, .mod-shot, .mod-phones { overflow: clip; }
    @keyframes shot-settle { from { scale: 1.05; } to { scale: 1; } }
    @keyframes phone-rise { from { translate: 0 28px; } to { translate: 0 0; } }
    .lead-stage > .appshot--bar img, .teaser a.appshot:not(.appshot--phone) img, .gallery .shot-link.appshot img { transform-origin: 50% 0; }
    .lead-stage > .appshot--bar img, .teaser a.appshot:not(.appshot--phone) img, .gallery .shot-link.appshot img, .mod-shot img, .app-media .app-shot img {
      animation: shot-settle linear both; animation-timeline: view(); animation-range: entry 0% cover 42%; }
    .lead .lead-phone, .app--feature .app-phone, .mod-phones .appshot--phone { animation: phone-rise linear both; animation-timeline: view(); animation-range: entry 0% cover 38%; }
    .mod-phones .appshot--phone:last-child { animation-range: entry 10% cover 46%; }
  }
}
