/* ctrlshft AI: page CSS.
   The kit in /assets carries the system (grid, type scale, buttons, cards, motion). This file holds only
   what the brand and the page's own visuals add: the logo artwork's sizes, the browser surfaces in the
   brand colours, and the insides of the drawn windows. */

/* ---------------------------------------------------------------- brand artwork */
.nav__logo { color: var(--accent, #176b50); }
.nav__logo svg.logo { height: 22px; width: auto; display: block; }
.footer__brand svg.logo-mark { height: 36px; width: auto; display: block; }
.close__word { color: var(--accent, #176b50); line-height: 0; font-size: 0; letter-spacing: 0; }
.close__word > svg { display: block; width: 100%; height: auto; }
/* the closing heading stays on one line from 1280px, so the wordmark keeps clear of the links under it */
@media (min-width: 1280px) { .closing__cta .section-head--split h2 { max-width: none; white-space: nowrap; } }
.closing__cta.close--word { padding-bottom: var(--s-7); }
.footer__legal .credits { display: inline; }

/* ---------------------------------------------------------------- browser surfaces, in the palette */
::selection { background: #176b50; color: #faf9f5; }
:root { accent-color: #176b50; caret-color: #176b50; scrollbar-color: color-mix(in oklab, #141413 28%, transparent) transparent; }

/* ---------------------------------------------------------------- small page parts */
.tool-tiles { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-top: var(--s-3); }
/* the hero's sub-line is read, so it takes the ink at 7:1 (the centred hero sets it grey) */
.hero--centred .hero__lead { color: color-mix(in oklab, var(--ink) 82%, var(--bg)); }
@media (max-width: 639px) { .card__cover, .statement__rows a { display: inline-flex; align-items: center; min-height: 44px; } }
.facts { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-2); }
.facts li { padding-top: var(--s-2); border-top: 1px solid var(--line); }
.card__cover { color: inherit; text-decoration: none; }
.card:has(.card__cover) { cursor: pointer; }

/* the statement (its moment: liquid-type) */
.statement { display: grid; gap: var(--s-6); align-content: start; }
.statement .mo-lt__type { font-family: var(--font-display); font-weight: var(--display-weight); max-width: none; font-size: clamp(52px, 11.4vw, 176px); letter-spacing: -0.045em; line-height: .98; }
.statement .t-lead { max-width: 56ch; }
@media (max-width: 639px) { .statement .mo-lt__type { font-size: clamp(44px, 15.5vw, 84px); } }
/* on a tablet held upright each sentence takes two lines, so the statement fills its screen */
@media (min-width: 640px) and (max-width: 1023px) { .statement .mo-lt__type { font-size: 16vw; } }

/* nav panel: four service cards, each with a cut fragment */
.menu-card .panel { --p-h: 190px; height: 190px; }

/* ---------------------------------------------------------------- the hero window (inside the visual) */
.hero__window { background: #cdd6c6; }
/* drawn windows are white on the lit ground, in the brand's ink and jade */
.lw, .app.ui { --fx-bg: #ffffff; --fx-surface: #f4f3ef; --fx-ink: #141413; --fx-muted: #696966; --fx-accent: #176b50; --fx-accent-ink: #faf9f5; }
.lw { font: 400 13px/1.4 var(--font-text); color: var(--u-ink); background: var(--u-bg); border: 1px solid var(--u-border); border-radius: var(--u-r); box-shadow: var(--u-shadow); overflow: hidden; text-align: left; }
.lw__bar { display: flex; align-items: center; gap: 12px; height: 40px; padding: 0 14px; border-bottom: 1px solid var(--u-line); color: var(--u-muted); white-space: nowrap; }
.lw__bar b { color: var(--u-ink); font-weight: 500; }
.lw__bar .sp { flex: 1; }
.lw__body { display: grid; grid-template-columns: 250px minmax(0, 1fr); min-height: 420px; }
.lw__list { border-right: 1px solid var(--u-line); padding: 10px; display: grid; align-content: start; gap: 2px; }
.lw__q { height: 34px; margin-bottom: 6px; border-radius: 9px; background: var(--u-fill-2); display: flex; align-items: center; padding: 0 10px; color: var(--u-muted); }
.lw__t { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 1px 10px; padding: 9px 8px; border-radius: 9px; }
.lw__t.is-on { background: var(--u-fill-2); }
.lw__t .ui-avatar { grid-row: 1 / span 2; width: 30px; height: 30px; }
.lw__t b { font-weight: 500; }
.lw__t time { color: var(--u-muted); }
.lw__t > span:last-child { grid-column: 2 / -1; color: var(--u-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lw__chat { display: grid; align-content: start; gap: 8px; padding: 14px 18px; min-width: 0; }
.lw__msg { justify-self: start; max-width: 86%; padding: 9px 12px; border-radius: 12px; background: var(--u-fill-2); }
.lw__msg--me { justify-self: end; background: var(--u-ink); color: var(--u-bg); }
.lw__msg small { margin-left: 8px; font-size: 12px; color: var(--u-muted); white-space: nowrap; }
.lw__tool { display: flex; align-items: center; gap: 8px; color: var(--u-muted); }
.lw__tool .ui-agent { flex: none; }
.lw__acts { display: flex; gap: 8px; }
@media (max-width: 639px) {
  .lw__body { grid-template-columns: minmax(0, 1fr); }
  .lw__list, .lw__bar .sp ~ span, .lw__tool { display: none; }
}

/* ---------------------------------------------------------------- app-frame (sections-library.md, the whole recipe) */
.app.ui { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); margin-top: var(--s-7); background: var(--u-bg); border: 1px solid var(--u-border); border-radius: var(--u-r); box-shadow: var(--u-shadow); }
.app > .app__pane { position: relative; min-width: 0; min-height: 0; overflow: hidden; }
.app > .app__pane + .app__pane { border-left: 1px solid var(--u-line); }
.app > .app__pane > .ui-panel { width: 100%; border: 0; border-radius: 0; box-shadow: none; }
/* the panes run past the window's foot and dissolve there (a mask, as .stage--fade-b does it) */
.app > .app__pane { -webkit-mask-image: linear-gradient(#000 calc(100% - 64px), transparent); mask-image: linear-gradient(#000 calc(100% - 64px), transparent); }
@media (min-width: 1024px) and (max-width: 1279px) { .app.ui { grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); } }
@media (max-width: 1023px) {
  .app.ui { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
  .app > .app__pane--list { max-height: 252px; }
  .app > .app__pane--list { -webkit-mask-image: none; mask-image: none; }
  .app .ui-win__side { display: none; }
  .app .ui-win__body { grid-template-columns: minmax(0, 1fr); }
  .app > .app__pane + .app__pane { border-left: 0; border-top: 1px solid var(--u-line); }
}
@media (max-width: 639px) {
  .app.ui { grid-template-rows: minmax(0, 1fr); }
  .app > .app__pane--list { display: none; }
  .app > .app__pane + .app__pane { border-top: 0; }
}
/* the open pane's document is the pane: the page fills it, its note keeps a column at the right */
.app > .app__pane--open > .ui-doc { width: auto; padding-right: 232px; }
.app > .app__pane--open .ui-doc__page { border: 0; border-radius: 0; box-shadow: none; padding: 28px 16px 32px 32px; }
.app > .app__pane--open .ui-doc__note { right: 16px; }
@media (max-width: 639px) {
  .app > .app__pane--open > .ui-doc { padding-right: 32px; }
  .app > .app__pane--open .ui-doc__page { padding: 20px 16px 24px 20px; }
  .app > .app__pane--open .ui-doc__note { right: 8px; }
}


/* under the statement: its one fact beside the brand kit's three service lines */
.statement__rows { list-style: none; margin: 0; padding: 0; }
.statement__rows > li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--s-5); align-items: baseline; padding-block: var(--s-4); border-bottom: 1px solid var(--line); }
.statement__rows > li:first-child { padding-top: 0; }
.statement__rows a { font: 500 var(--t-lead)/1.3 var(--font-text); color: var(--ink); text-decoration: none; transition: color var(--m-in, 150ms) var(--ease, ease); }
.statement__rows a:hover { color: var(--accent); }
.statement__rows span { color: var(--ink); }

/* an inner page's split frame: taller than the kit's 5:4 from 1024px, so the section fills its screen */
@media (min-width: 1024px) { .frame--split.frame--tall { --ratio: 108%; } }
/* the statement hero keeps its four facts on a phone, two by two at the foot of the screen */
@media (max-width: 639px) {
  .hero--statement .hero__facts { display: grid; }
  .rows__name > a { display: inline-flex; align-items: center; min-height: 44px; }
}

/* stacked on a tablet or a phone, a split's frame keeps its distance from the words above it */
@media (max-width: 1023px) { .grid > .frame--tall { margin-top: var(--s-6); } }

/* a split's text column with its facts on the picture's bottom line */
.col-foot { display: flex; flex-direction: column; }
.col-foot > .col-foot__end { margin-top: auto; padding-top: var(--s-6); display: grid; gap: var(--s-5); }

/* ---------------------------------------------------------------- card groups: one panel height each */
#build .panel { --p-h: 336px; }
/* a 768px-high screen holds less: lower panels keep the four cards on their two screens */
@media (min-width: 1024px) and (max-width: 1279px) { #build .panel { --p-h: 250px; } }
/* a phone: four panels of one height; the agents card shows its three results as a checklist there, the diagram from 640px */
@media (max-width: 639px) { #build .panel { --p-h: 184px; } #build .stage { --fade-h: 40px; } #build .dg[data-wide] { display: none; } #build .ui-tg:nth-child(n+4), #build .ui-note:nth-child(n+3) { display: none; } }
@media (min-width: 640px) { .phone-only { display: none; } }
/* the capability pages' lanes diagrams: under 640px the frame shows the steps as a checklist instead */
@media (max-width: 639px) { .frame--split > .dg[data-wide] { display: none; } }

/* diagram captions are read on the lit ground: a darker grey there, so they keep 4.5:1 */
.dg { --dg-muted: color-mix(in oklab, var(--ink) 72%, #cdd6c6); }

/* at rest on a phone the pinned steps stand as a list: the section still keeps its two whole screens */
@media (max-width: 639px) { #process[data-moment] { min-height: 200lvh; } #process .mo-pc__visual--lit { aspect-ratio: 16 / 10; align-items: flex-start; } }

/* ---------------------------------------------------------------- laptop screens: wide but short
   From 1280px the kit fixes every section at exactly its screens, which holds on a 900px-tall
   window. A browser on a 1920x1080 display at 150%, a 1366x768 laptop or a 13-inch MacBook is only
   620 to 800px tall: there a section keeps at least its screens and grows with its content (the
   kit's own rule from 640 to 1279px), so nothing is laid over the section after it. */
@media (min-width: 1280px) and (max-height: 899px) {
  main > :is(section, .section):not(.hero, .section--hero), footer.closing {
    height: auto; min-height: calc(var(--h, 1) * 100vh); min-height: calc(var(--h, 1) * 100svh);
  }
  :where(main > :is(section, .section):not(.hero, .section--hero), footer.closing) { display: flex; flex-direction: column; }
  main > :is(section, .section):not(.hero, .section--hero) > :is(.wrap, .container), footer.closing > .wrap { flex: 1 0 auto; height: auto; min-height: 0; }
  /* a block that takes "the rest of the screen" may not shrink under its own content here */
  main > :is(section, .section) > .wrap > .fill { flex: 1 0 auto; }
  /* a split hero too: at least the first screen, taller when its words need it */
  main > .hero--split { height: auto; min-height: 100vh; min-height: 100svh; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: 1fr; grid-auto-rows: auto; }
  main > .hero--split > :is(.wrap, .container) { height: auto; }
}
/* under 760px of height the sections give back some of their padding */
@media (min-width: 1280px) and (max-height: 759px) { :root { --padt: 104px; --padb: 56px; } }
