/* Lavin Advisory public page (LAV-38): page CSS only, on top of the design-taste system.
   Only what the kit lacks: the skip link, plain fact lines, the tool tiles and the stack rows. */

/* skip link (system.md, Base): off-screen until focused, never pushing the logo off the left line */
.skip { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip:focus { width: auto; height: auto; clip-path: none; padding: var(--s-2) var(--s-4); background: var(--bg); color: var(--ink); z-index: 20; border-radius: var(--r-sm); }

/* the kit's stack-2..6 stop at 48; one step more for the tool tiles above the stack rows */
.stack-8 > * + * { margin-top: var(--s-8); }

/* up to three short facts as plain lines (split-text-left) */
.facts { list-style: none; margin-inline: 0; margin-bottom: 0; padding: 0; display: grid; gap: var(--s-3); }
.facts li { font-size: var(--t-body); line-height: 1.6; padding-top: var(--s-3); border-top: 1px solid var(--line); }

/* the platforms we deliver on: six equal tiles in the services frame, no centre, the frame as tall as
   the tiles. Each tile stacks from the top (plate, name, line) so the six names start on one line; the
   glyph sits on the kit's accent plate, so a Lucide stroke drawn to the edge of its box never reads as cut off */
.platforms-frame { display: block; padding: var(--s-6); }
.platforms { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-rows: 1fr; gap: var(--s-4); }
.platform { display: flex; flex-direction: column; align-items: flex-start; gap: var(--s-2); padding: var(--s-5); background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-md); }
.platform__name { font: 500 var(--t-card)/1.3 var(--font-display); letter-spacing: -0.01em; margin-top: var(--s-4); text-wrap: balance; }
.platform__line { font-size: var(--t-body); line-height: 1.5; color: var(--ink); }
@media (max-width: 1279px) { .platforms { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* 1024 to 1279: the frame beside the list is narrow, so a tile keeps its plate and name only */
@media (min-width: 1024px) and (max-width: 1279px) { .platform__line { display: none; } }
/* under 1024 (stacked): compact tiles, the plate on the left and the words beside it, so the grid stays
   within its screen; two columns on a tablet, one on a phone */
@media (max-width: 1023px) {
  .platforms { grid-auto-rows: auto; }
  .platform { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: var(--s-4); row-gap: var(--s-1); align-items: start; }
  .platform > .ic-tile { grid-row: 1 / span 2; }
  .platform__name { margin-top: 0; }
}
@media (max-width: 639px) { .platforms-frame { padding: var(--s-4); } .platforms { grid-template-columns: 1fr; gap: var(--s-3); } .platform { padding: var(--s-4); } }

/* the stack as rows: the group on the left, its names beside it */
.stack-rows { margin-inline: 0; margin-bottom: 0; }
.stack-rows > div { display: grid; gap: var(--s-1); padding-block: var(--s-4); border-bottom: 1px solid var(--line); }
.stack-rows > div:first-child { padding-top: 0; }
.stack-rows dt { font-weight: 500; }
.stack-rows dd { margin: 0; line-height: 1.6; }

/* tablet (640 to 1023): the splits stack within one screen, the picture frames shorter there */
@media (min-width: 640px) and (max-width: 1023px) {
  #approach .frame--split { --ratio: 64%; }
  #expertise .frame--split { --ratio: 45%; }
  .footer .closing__links .grid > .span-6 { grid-column: 1 / -1; }
  .footer .closing__links .footer__col { grid-column: auto / span 6; }
}

/* phone (under 640): sections size to their content. A phone is scrolled, not paged, so the
   skill's one-or-two-screens rule left half-empty screens; desktop and tablet keep it. Each split
   stacks the words, then the picture, with the system's heading-to-content space between them. */
@media (max-width: 639px) {
  :root { --padt: 72px; }
  main > :is(section, .section):not(.hero, .section--hero), footer.closing { height: auto; }
  main > .section.g2m > .wrap { display: flex; flex-direction: column; row-gap: var(--s-7); }
  .section.g2m > .wrap > .grid { display: contents; }
  #approach .frame--split { --ratio: 100%; }
  #expertise .frame--split { --ratio: 122%; }
  /* the hero is content height too, so the code review gets a fixed panel tall enough to show the
     whole change, the reviewer's comment and the lines after it */
  main > .hero { height: auto; min-height: 0; }
  .hero > .wrap { height: auto; }
  .hero--split .hero__media { flex: none; height: 540px; min-height: 0; }
}

/* the fragments' bottom fade as a gradient over the stage instead of the kit's CSS mask: iOS Safari's
   full-page capture draws a masked stage as a solid black box */
.stage--fade-b { -webkit-mask: none; mask: none; }
.stage--fade-b::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: var(--fade-h); z-index: 3; pointer-events: none; background: linear-gradient(to bottom, transparent, var(--fade-to, var(--surface))); }
#expertise .stage--fade-b { --fade-to: #dfe8f0; }

/* the stack's UI panel on the dark band sits on a lit ground (3:1 or more against its dark card) */
#expertise .frame--split { background: #dfe8f0; border-color: transparent; }

/* services on a tablet (640 to 1023), stacked within one screen: the six rows in two columns, the
   platform tiles as plate and name (the rows carry the detail), the tiles on the page's own lines */
@media (min-width: 640px) and (max-width: 1023px) {
  #services .rows { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--s-5); }
  #services .rows > li:nth-child(2) { padding-top: 0; }
  #services .rows > li { align-content: start; }
  #services .platforms-frame { padding: 0; background: none; border: 0; border-radius: 0; overflow: visible; margin-top: var(--s-6); }
  #services .platform__line { display: none; }
  #services .platform { align-items: center; }
  #services .platform > .ic-tile { grid-row: auto; }
}

/* the hero's code review: it opens on the suggestion (red out, green in); applied, the removed lines
   collapse out and the added line is ordinary code (.is-merged, set by the hero's script) */
.ui-diff [data-sug-del] { max-height: 3em; overflow: hidden; transition: max-height 280ms var(--m-ease, ease), opacity 180ms ease; }
.ui-diff.is-merged [data-sug-del] { max-height: 0; opacity: 0; }
.ui-diff [data-sug-add] { transition: background-color 280ms ease; }
@media (prefers-reduced-motion: reduce) { .ui-diff [data-sug-del], .ui-diff [data-sug-add] { transition: none; } }

/* Approach: the release run sits centred in its frame, and the frame is never taller than the
   screen leaves under --padt, so it cannot run into the navy band on a short window. The kit shows
   the run's log only in its wide layout; from 640 up it shows under the steps too, so the card ends on
   the data checks' output rather than on empty ground (a phone keeps the shorter card). */
@media (min-width: 1024px) {
  #approach .frame--split { --ratio: clamp(440px, 80%, calc(100svh - var(--padt) - var(--padb) - var(--bar, 0px))); }
}
@media (min-width: 640px) {
  #approach .frame--split > .stage > .at-rise { top: 50%; translate: 0 -50%; }
  #approach .ui-pipe .ui-pipe__log {
    display: block; margin: 0 16px 16px; padding: 11px 14px;
    border-radius: var(--u-r2); background: var(--u-fill); box-shadow: inset 0 0 0 1px var(--u-line);
    font: 12px/20px var(--ui-mono, ui-monospace, monospace); color: var(--u-text-2);
  }
}

/* the hero from 640 to 1023 stacks the words over the code review. On a short window (a tablet held
   sideways, a narrow laptop window) one screen cannot hold both, and the kit's fixed-height hero let
   the panel run over Our services. Here the hero is at least one screen and grows past it instead,
   and the panel keeps enough height to show the change (on a tall tablet it still fills the screen). */
@media (min-width: 640px) and (max-width: 1023px) {
  main > .hero { height: auto; min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; }
  main > .hero > .wrap { height: auto; flex: 1 0 auto; }
  main > .hero > .wrap > .hero-text { height: auto; flex: 1 0 auto; }
  main .hero--split .hero__media { min-height: 420px; }
}

/* the MCP servers panel: the header bar is as tall as a server row (the kit's 44px bar sat the logo
   tile tight against the panel's top edge): 56px, and 72px on a phone, where each row's line wraps */
#expertise .ui-apps > .ui-head { height: 56px; }
@media (max-width: 639px) { #expertise .ui-apps > .ui-head { height: 72px; } }

/* LAV-54: three motion touches. Reduced motion keeps the hover colour and drops every animation. */

/* the platform tiles glow on hover (a pointer only, so a tap never leaves one lit): the accent border,
   a soft accent shadow, a 2px lift and a deeper plate. They are not links, so the cursor stays put. */
.platform { transition: border-color 200ms ease, box-shadow 200ms ease, transform 200ms ease; }
.platform > .ic-tile { transition: background-color 200ms ease; }
@media (hover: hover) and (pointer: fine) {
  .platform:hover {
    border-color: color-mix(in oklab, var(--accent) 55%, var(--line));
    box-shadow: 0 0 0 3px color-mix(in oklab, var(--accent) 12%, transparent), 0 10px 28px -10px color-mix(in oklab, var(--accent) 45%, transparent);
    transform: translateY(-2px);
  }
  .platform:hover > .ic-tile--accent { --tile-bg: color-mix(in oklab, var(--accent) 20%, var(--bg)); }
}

/* the MCP servers: each Connected dot is green and sends out a ring, row by row down the list, like a
   health check passing through each server; the count in the header carries the same live dot */
#expertise .ui-apps { --live: #47c86e; }   /* Live in the design system: a connected dot on dark UI only */
#expertise .ui-app .ui-app__on::before { background: var(--live); opacity: 1; animation: lav-live 3.2s ease-out infinite; }
#expertise .ui-app:nth-child(2) .ui-app__on::before { animation-delay: 0.4s; }
#expertise .ui-app:nth-child(3) .ui-app__on::before { animation-delay: 0.8s; }
#expertise .ui-app:nth-child(4) .ui-app__on::before { animation-delay: 1.2s; }
#expertise [data-apps-count] { display: inline-flex; align-items: center; gap: 6px; }
#expertise [data-apps-count]::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--live); animation: lav-live 3.2s ease-out infinite; }
@keyframes lav-live {
  0% { box-shadow: 0 0 0 0 color-mix(in oklab, var(--live) 70%, transparent); }
  40%, 100% { box-shadow: 0 0 0 6px color-mix(in oklab, var(--live) 0%, transparent); }
}

/* Apply suggestion breathes a soft accent glow so it reads as a button to press. The glow is its own
   layer, so the kit's step, press and wait shadows stay as they are; it stops on hover, while pressed or
   waiting, and once the change is applied. */
.ui-diff__apply { position: relative; }
.ui-diff__apply::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  box-shadow: 0 0 0 0 color-mix(in oklab, var(--accent) 0%, transparent);
  animation: lav-invite 2.4s ease-in-out infinite;
}
.ui-diff__apply:is(:hover, :focus-visible, .is-step, .is-pressed, .is-wait)::after,
.ui-diff.is-applied .ui-diff__apply::after { animation: none; }
@keyframes lav-invite {
  0%, 100% { box-shadow: 0 0 0 0 color-mix(in oklab, var(--accent) 0%, transparent), 0 0 0 0 color-mix(in oklab, var(--accent) 0%, transparent); }
  50% { box-shadow: 0 0 0 3px color-mix(in oklab, var(--accent) 30%, transparent), 0 0 14px 2px color-mix(in oklab, var(--accent) 45%, transparent); }
}

@media (prefers-reduced-motion: reduce) {
  .platform, .platform > .ic-tile { transition: none; }
  .platform:hover { transform: none; }
  #expertise .ui-app .ui-app__on::before, #expertise [data-apps-count]::before, .ui-diff__apply::after { animation: none; }
}

/* LAV-49: the AI Pilot Training course page (unlisted for now). Scoped to .course
   (main) and the page's close; the kit's rows, splits, band and close do the rest. */

/* the hero's eyebrow and its one grey fact line */
.course .course__eyebrow { margin: 0 0 var(--s-4); font-size: var(--t-label); font-weight: 500; color: var(--muted); }
.course .course__facts { margin: var(--s-5) 0 var(--s-4); font-size: var(--t-small); color: var(--muted); }
.course .hero__text .link { display: inline-block; }

/* a bold lead-in at the start of a row, in the copy's own words */
.course .course__lead-in { font-weight: 500; }

/* the second column's heading (one h2 per section): the card size, on the h2's top line */
.course .course__h3 { margin: 0; font: 500 var(--t-card)/1.3 var(--font-display); letter-spacing: -0.01em; }
.course .course__aside > p { margin-bottom: 0; line-height: 1.6; }
.course .course__aside > :first-child { margin-top: 0; }
/* the paired column sits on a flat surface panel, so a section reads as a statement and its detail */
.course .course__aside { background: var(--surface); border-radius: var(--r-lg); padding: var(--s-7); }
@media (max-width: 639px) { .course .course__aside { padding: var(--s-5); } }

/* the three judgments, numbered in the accent, each closed by the page's hairline */
.course .course__steps { list-style: none; counter-reset: judge; margin-inline: 0; margin-bottom: 0; padding: 0; }
.course .course__steps > li { counter-increment: judge; display: grid; grid-template-columns: var(--s-6) minmax(0, 1fr); padding-block: var(--s-3); border-bottom: 1px solid var(--line); line-height: 1.6; }
.course .course__steps > li::before { content: counter(judge); font-weight: 500; color: var(--accent); }
.course .course__steps > li:first-child { padding-top: 0; }

/* the six weeks as a table on the grid: the week, its focus, what you finish with */
.course .course__table { display: grid; }
.course .course__tr { display: grid; grid-template-columns: 2fr 5fr 5fr; column-gap: var(--s-5); padding-block: var(--s-3); border-bottom: 1px solid var(--line); line-height: 1.5; }
.course .course__th { padding-top: 0; border-bottom: 0; font-size: var(--t-label); font-weight: 500; color: var(--muted); }
.course .course__week { font-weight: 500; font-variant-numeric: tabular-nums; }
@media (max-width: 639px) {
  .course .course__th { display: none; }
  .course .course__tr { grid-template-columns: 1fr; row-gap: var(--s-1); }
  .course .course__tr > [role="cell"]:last-child { color: var(--muted); }
}

/* the price on the navy band: the figure at the stat size, under the h3 */
.course .course__price { display: flex; flex-direction: column; align-items: flex-start; gap: var(--s-4); }
.course .course__price > * { margin: 0; }
.course .course__price > p { margin: 0; line-height: 1.6; }
.course .course__amount { font: 400 var(--t-stat)/1 var(--font-display); letter-spacing: var(--display-tracking); font-variant-numeric: tabular-nums; }
.course .course__price > .course__amount { margin-top: var(--s-2); }
.course .course__price > .course__amount-note { margin-top: calc(-1 * var(--s-3)); color: var(--muted); }

/* the close: the one signup button, the consult as a link under it */
#apply .course__consult { align-self: flex-start; }

/* tablet and phone: the second column stacks under the first with the heading-to-content space */
@media (max-width: 1023px) {
  .course .course__aside, .course .course__price { grid-column: 1 / -1; margin-top: var(--s-7); }
}
/* a phone: the close's long label wraps inside the full-width button instead of pushing past the wrap */
@media (max-width: 639px) { #apply .btn--xl { white-space: normal; text-wrap: balance; height: auto; min-height: 48px; padding-block: var(--s-3); } }
/* the course hero's loop panel is shorter than the homepage's code review, so from 640 to 1023 its
   frame needs less height and the words plus the panel fit one tablet screen */
@media (min-width: 640px) and (max-width: 1023px) { main.course .hero--split .hero__media { min-height: 340px; } }
/* the course page on a tablet (640 to 1023): as Our services does, the rows run in two columns and the
   panel is tighter, so each stacked section stays within one screen */
@media (min-width: 640px) and (max-width: 1023px) {
  .course .g2m .rows { display: block; columns: 2; column-gap: var(--s-5); }
  .course .g2m .rows > li { display: block; break-inside: avoid; padding-block: 0 var(--s-4); margin-bottom: var(--s-4); }
  .course .course__aside { padding: var(--s-6); margin-top: var(--s-6); }
  .course .course__price { display: grid; grid-auto-flow: row dense; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); column-gap: var(--s-6); row-gap: var(--s-3); align-items: start; }
  .course .course__price > :not(.course__h3, .course__amount, .course__amount-note) { grid-column: 2; }
  .course .course__price > :is(.course__h3, .course__amount, .course__amount-note) { grid-column: 1; }
  .course .course__price > .course__amount-note { margin-top: 0; }
}

/* LAV-50: the course application form (unlisted). The kit's .form and .field do the fields;
   this sets the panel, the optional marks, the helper line, the error and the hidden honeypot. */
.apply .apply__intro > :is(h1, p) { margin-bottom: 0; }
.apply .apply__intro > p { line-height: 1.6; }
.apply .apply__panel { padding: var(--s-7); }
.apply .apply__form { margin: 0; }
.apply .apply__form .field > span { display: block; }
.apply .apply__opt { font-weight: 400; color: var(--muted); }
.apply .apply__help { margin: calc(-1 * var(--s-2)) 0 0; font-size: var(--t-small); color: var(--muted); line-height: 1.5; }
.apply .apply__error { margin: 0; padding: var(--s-3) var(--s-4); border-left: 2px solid currentColor; background: var(--bg);
  color: #A4262C; font-size: var(--t-small); font-weight: 500; }
.apply .apply__error:focus { outline: none; }
.apply .apply__actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3); margin-top: var(--s-2); }
.apply .apply__hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.apply .apply__sent > * { margin: 0 0 var(--s-4); }
.apply .apply__sent:focus { outline: none; }
@media (max-width: 639px) {
  .apply .apply__panel { padding: var(--s-5); }
  .apply .apply__actions .btn { width: 100%; }
}

/* Nav, small laptop (1024-1279): with Client login and Student login beside Book a call, the actions are
   wider than the kit's centred grid leaves them (1fr auto 1fr), so the words centre between the logo and
   the actions instead of on the page axis. From 1280 the kit's centred bar fits. */
@media (min-width: 1024px) and (max-width: 1279px) {
  .nav--centre .nav__bar { grid-template-columns: auto minmax(0, 1fr) auto; }
}
