/* Apps in build (page-apps.php). functions.php loads this file on that page only, after light.css.
   The screen grammar is the Float Valley app section's (showcase.css): a phone-shaped crop, no device hardware. */

/* Each chapter's light is the app's own colour, blurred, and nothing else of the app's identity enters the frame. */
/* The template sets --cols-want per chapter (how many screens it has, 2 to 5); the widths below narrow it. */
.app-ch{--app-gap:clamp(14px,1.9vw,26px); --app-cols:var(--cols-want,5)}
.app-light{opacity:.5}
.app-light i{position:absolute; border-radius:50%}
.app-light .a{width:40vw; height:34vw; left:54%; top:-14%; background:var(--l1)}
.app-light .b{width:26vw; height:26vw; left:-6%; top:52%; background:var(--l2)}
.app-light .c{width:20vw; height:20vw; left:66%; top:58%; background:var(--l3); opacity:.7}
.app-ch:nth-child(even) .app-light .a{left:-8%}
.app-ch:nth-child(even) .app-light .b{left:62%}
:root[data-theme="dark"] .app-light{opacity:.42}

/* The head: name and line on the left, what it is and the spec on the right. */
.app-head{align-items:start; margin-bottom:clamp(36px,5vw,64px)}
.app-head .tag{font-size:clamp(1.25rem,1.9vw,1.6rem); line-height:1.3; color:var(--slate); max-width:30ch}
.app-about{display:grid; gap:20px; align-content:start}
.app-about p{font-size:17px}
.app-about .cf-spec{grid-template-columns:auto minmax(0,1fr); gap:9px 24px; max-width:60ch}
.app-about .cf-spec dd{margin:0; color:var(--slate); font-size:15px}

/* The screens: up to five across, then three, then two. A wide capture takes two columns. */
.app-row{display:flex; flex-wrap:wrap; justify-content:center; gap:clamp(32px,4vw,48px) var(--app-gap)}
.app-fig{flex:0 0 calc((100% - (var(--app-cols) - 1) * var(--app-gap)) / var(--app-cols)); min-width:0; margin:0; display:grid; gap:16px; align-content:start}
/* A phone never grows past a phone, however few there are in the row. */
.app-fig:not(.app-fig-wide){max-width:300px}
.app-fig-wide{flex-basis:calc(2 * (100% - (var(--app-cols) - 1) * var(--app-gap)) / var(--app-cols) + var(--app-gap))}
.app-screen{width:100%; height:auto; aspect-ratio:1206/2462; object-fit:cover; object-position:top; border-radius:11% / 5.4%; background:var(--mist);
  box-shadow:0 34px 56px -32px rgba(25,50,90,.5), 0 6px 16px -10px rgba(25,50,90,.28)}
.app-fig-wide .app-screen{aspect-ratio:16/10; border-radius:clamp(14px,1.6vw,22px)}
:root[data-theme="dark"] .app-screen{box-shadow:0 0 0 1px rgba(255,255,255,.1), 0 34px 56px -30px rgba(0,0,0,.85)}
.app-fig figcaption{display:grid; gap:5px; align-content:start; min-width:0}
.app-name{font-size:17px; font-weight:500; letter-spacing:-.01em; color:var(--ink)}
.app-what{font-size:14.5px; line-height:1.45; color:var(--slate)}
/* Slate, not mute: the coloured light passes behind these lines. */
.app-ch .app-src{margin-top:3px; font-size:11px; letter-spacing:.02em; text-transform:none; color:var(--slate)}

/* Where it stands, and the way through. */
.app-foot{display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:20px 40px; margin-top:clamp(32px,4vw,48px)}
.app-stage{display:grid; gap:8px; font-size:15px; color:var(--slate); max-width:70ch}

/* How we build: two buttons under the head. */
#how .cf-actions{display:flex; flex-wrap:wrap; gap:12px}

@media (max-width:1100px){ .app-ch{--app-cols:min(3, var(--cols-want,5))} .app-fig-wide{flex-basis:100%} .app-fig-wide .app-screen{aspect-ratio:16/10} }
@media (max-width:860px){ .app-head{grid-template-columns:minmax(0,1fr)} }
@media (max-width:640px){
  .app-ch{--app-cols:2}
  .app-fig{gap:12px}
  .app-fig:last-child:nth-child(odd){flex-basis:100%; grid-template-columns:repeat(2,minmax(0,1fr)); column-gap:var(--app-gap); align-items:end}
  .app-row .app-fig-wide:last-child:nth-child(odd){grid-template-columns:minmax(0,1fr)}
}

/* v3.9.2: App development offer grid */
.app-kinds{display:grid;gap:18px;grid-template-columns:repeat(auto-fit,minmax(min(100%,300px),1fr));margin-top:clamp(28px,4vw,48px)}
.app-kind{display:grid;gap:10px;align-content:start;padding:clamp(22px,3vw,32px);border-radius:22px}
.app-kind h3{margin:0}
.app-kind p{margin:0}
