/* imghd.ai page CSS. The kit (assets/) gives the grid, type, buttons, nav, cards, grounds and motion.
   This file holds only what sits inside a visual and the kit lacks: the client's logo, the upscaler's own
   UI (the viewer window, today's list, the before/after line), the phone, the limits card, one --p-h. */

/* the client's logo (logo 13, two layers: a blue square over an open frame; the wordmark in Space Grotesk 600 as paths) */
.site-logo { display: block; height: 26px; width: auto; }

/* the lit ground behind UI and under the closing slab: the client's own light grey, the ground of its logo sheet
   (the kit's sand, sky and sage are tinted; the client's colours are black, white, blue and this grey) */
html[data-ground="sky"] { --ground-bg: #f3f6f7; --ground-surface: #ffffff; --ground-ink: #0e0e0e; --ground-muted: #555d66; --ground-accent: #2f6bfe; }
/* the closing slab keeps the page's one primary: the blue of the logo (on a dark page the kit turns it to the ground's ink) */
.footer--statement { --action: var(--p-action); --action-ink: var(--p-action-ink); }

/* ---------------------------------------------------------------- the upscaler's own UI */
/* a light fragment on the lit ground (hero art, the band, the app frame); the limits card on the page is dark */
.vw, .note, .device { --fx-bg: #ffffff; --fx-surface: #f3f5f7; --fx-ink: #0e0e0e; --fx-muted: #5d6670; --fx-accent: #2f6bfe; --fx-accent-ink: #ffffff; }
.app.ui, .app.ui .vw, .limits { --fx-bg: #1b1b1d; --fx-surface: #242427; --fx-ink: #ffffff; --fx-muted: #a4a4a8; --fx-accent: #2f6bfe; --fx-accent-ink: #ffffff; }

.vw { overflow: hidden; display: flex; flex-direction: column; font: 400 13px/1.4 var(--font-text); color: var(--u-ink); }
.vw__crumb { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 13px; color: var(--u-muted); white-space: nowrap; }
.vw__crumb img { width: 14px; height: 14px; flex: none; }
.vw__crumb i { font-style: normal; opacity: .5; }
.vw__crumb b { font-weight: 500; color: var(--u-ink); overflow: hidden; text-overflow: ellipsis; }
.vw__dims { font: 400 12px/1 var(--font-mono); color: var(--u-muted); white-space: nowrap; }
.vw__seg { display: inline-flex; flex: none; gap: 2px; padding: 2px; border-radius: 99px; background: var(--u-fill-2); font-size: 12px; line-height: 16px; }
.vw__seg > * { padding: 2px 10px; border-radius: 99px; font-weight: 500; color: var(--u-muted); }
.vw__seg > b { background: var(--u-ink); color: var(--u-bg); }
.vw__cmp { flex: 1 1 0; min-height: 0; }

/* the before/after line: the photo before on the left of the line, the photo after on its right */
.cmp { position: relative; overflow: hidden; background: #0b0b0b; user-select: none; -webkit-user-select: none; }
.cmp picture { display: contents; }
.cmp__img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; display: block; }
.cmp__after { clip-path: inset(0 0 0 var(--pos, 50%)); }
.cmp__line { position: absolute; z-index: 1; top: 0; bottom: 0; left: var(--pos, 50%); width: 2px; margin-left: -1px; background: #fff; pointer-events: none; }
.cmp__knob { position: absolute; left: 50%; top: var(--knob, 50%); width: 36px; height: 36px; margin: -18px 0 0 -18px; border-radius: 50%;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 36 36'%3E%3Cpath d='M15 13l-5 5 5 5M21 13l5 5-5 5' fill='none' stroke='%230e0e0e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 36px no-repeat;
  box-shadow: 0 4px 16px rgb(0 0 0 / .35); }
.cmp__range { position: absolute; inset: 0; z-index: 2; cursor: ew-resize; touch-action: pan-y; }
.cmp__range:focus-visible { outline: 2px solid var(--action); outline-offset: -4px; border-radius: inherit; }

/* ---------------------------------------------------------------- the hero's art: the viewer window and its result card */
.hero__art { background:
    radial-gradient(70% 60% at 16% 8%, color-mix(in oklab, var(--ground-surface) 80%, white), transparent 70%),
    radial-gradient(60% 50% at 94% 100%, color-mix(in oklab, var(--ground-bg) 80%, var(--ground-accent)), transparent 70%),
    var(--ground-bg); }
/* the window ends inside the frame, 24px above its foot, so its whole lower edge shows; the frame cuts only its right edge */
.hero__art > .ly-piece--main { bottom: var(--s-6); }
@media (max-width: 639px) { .hero__art > .ly-piece--main { bottom: var(--s-4); } }
.hero__art > .ly-piece--main .ui-win__bar { padding-right: var(--ly-cut-room); }
.hero__art > .ly-piece--main .cmp__img { object-position: 30% 30%; }
.hero__art > .ly-piece--main .vw__cmp { --knob: 38%; }
.hero__art > .ly-piece--note { left: var(--s-6); bottom: var(--s-8); width: 300px; z-index: 2; }
@media (max-width: 1023px) { .hero__art > .ly-piece--note { left: var(--s-4); bottom: var(--s-7); width: 270px; } }
.hero__proof { font-size: var(--t-small); color: color-mix(in oklab, var(--ink) 76%, var(--bg)); }
@media (min-width: 640px) { .hero .btn-row > .link { margin-left: var(--s-3); } }
.note { padding: 14px 16px; font: 400 13px/1.4 var(--font-text); color: var(--u-text-2); }
.note__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.note__head b { font-weight: 500; color: var(--u-ink); }
.note__line { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-top: 1px solid var(--u-line); }
.note__line i { width: 18px; height: 18px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--u-fill-2); color: var(--u-ink); font: 500 11px/1 var(--font-mono); font-style: normal; }
.note__line b { font-weight: 500; color: var(--u-ink); }

/* ---------------------------------------------------------------- the app frame: today's list beside the open photo (sections-library.md, app-frame) */
.app.ui { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); 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); overflow: hidden; }
.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; }
.app > .app__pane > .ui-panel { height: 100%; }
.app > .app__pane--open .cmp__img { object-position: 40% 40%; }
.ql { display: flex; flex-direction: column; font: 400 13px/1.4 var(--font-text); color: var(--u-ink); }
/* whole rows only: the list pane is a size container, and a row it cannot hold whole is not shown (rows 60px, a label 30px) */
.app > .app__pane--list { container-type: size; }
.ql__body { flex: 1 1 0; min-height: 0; overflow: hidden; padding: 0 6px 6px; }
@container (max-height: 651px) { .ql__body > :nth-child(n+8) { display: none; } }
@container (max-height: 591px) { .ql__body > :nth-child(n+7) { display: none; } }
@container (max-height: 531px) { .ql__body > :nth-child(n+6) { display: none; } }
@container (max-height: 471px) { .ql__body > :nth-child(n+5) { display: none; } }
@container (max-height: 411px) { .ql__body > :nth-child(n+4) { display: none; } }
.ql__quota { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; padding: 12px 14px 14px; border-bottom: 1px solid var(--u-line); color: var(--u-muted); }
.ql__quota b { font-weight: 500; color: var(--u-ink); }
.ql__bars { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; }
.ql__bars i { height: 4px; border-radius: 99px; background: var(--u-fill-3); }
.ql__label { margin: 0; height: 30px; padding: 10px 8px 0; font-size: 12px; line-height: 16px; color: var(--u-muted); }
.ql__row { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; grid-template-rows: auto auto; column-gap: 12px; align-items: center; height: 60px; padding: 8px; border-radius: var(--u-r2); }
.ql__row.is-on { background: var(--u-fill-2); }
.ql__row > img { grid-row: 1 / span 2; width: 44px; height: 44px; border-radius: 8px; object-fit: cover; }
.ql__name { align-self: end; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ql__meta { grid-column: 2; align-self: start; font-size: 12px; color: var(--u-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ql__row > .ui-win__st { grid-column: 3; grid-row: 1 / span 2; }
@media (min-width: 1024px) and (max-width: 1279px) { .app.ui { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); } }
/* a tablet and a phone: the open photo alone, its own bar as the chrome */
@media (max-width: 1023px) {
  .app.ui { grid-template-columns: minmax(0, 1fr); min-height: 320px; }
  .app > .app__pane--list { display: none; }
  .app > .app__pane + .app__pane { border-left: 0; }
}
@media (max-width: 639px) { .vw__dims { display: none; } }

/* ---------------------------------------------------------------- the four examples: one panel height for the group */
#examples .panel { --p-h: 336px; overflow: hidden; }
#examples .panel > .cmp { position: absolute; inset: 0; }
@media (max-width: 639px) { #examples .panel { --p-h: 180px; } }
@media (min-width: 1024px) and (max-width: 1279px) { #examples .panel { --p-h: 280px; } }
/* the dotted ground sets its own least height: the section keeps its two screens at every width (layout-v4.md: a ground never changes a section's height) */
@media (max-width: 1279px) { #examples { --g-screen: 200svh; } }
@media (max-width: 639px) { #examples { --g-screen: 200lvh; } }

/* ---------------------------------------------------------------- the statement: three lines and larger letters where the screen is tall and narrow */
.br-narrow { display: none; }
@media (min-width: 1024px) and (max-width: 1279px) { #sharp .mo-gt__type { font-size: 16vw; } }
@media (max-width: 1023px) { .br-narrow { display: inline; } #sharp .mo-gt__type { font-size: 30vw; } }

/* ---------------------------------------------------------------- the app section: the store row, the list form, the phone */
.app-copy { display: grid; gap: var(--s-5); align-content: start; }
.app-copy > * { margin: 0; }
.app-stores { display: flex; align-items: center; gap: var(--s-3); color: var(--muted); }
.app-stores .ic { width: 28px; height: 28px; flex: none; }
.app-form > .form__status:empty { display: none; }
.device { width: 100%; aspect-ratio: 280 / 570; padding: 8px; border-radius: 40px; background: #0e0e0e; box-shadow: 0 0 0 1px rgb(0 0 0 / .2), var(--u-shadow); }
.device__screen { height: 100%; display: flex; flex-direction: column; border-radius: 32px; overflow: hidden; background: var(--u-bg); color: var(--u-ink); font: 500 13px/1.3 var(--font-text); }
.device__top { display: flex; justify-content: space-between; align-items: center; padding: 10px 20px 2px; font-size: 12px; }
.device__island { width: 78px; height: 22px; border-radius: 99px; background: #0e0e0e; }
.device__head { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px 10px; }
.device__head > img { height: 16px; width: auto; }
.device__cmp { flex: 1 1 0; min-height: 0; margin: 0 10px; border-radius: 18px; }
.device__meta { display: flex; justify-content: space-between; padding: 12px 16px 0; font: 400 12px/1 var(--font-mono); color: var(--u-muted); }
.device__meta b { font-weight: 500; color: var(--u-ink); }
.device__save { margin: 12px 12px 16px; height: 44px; border-radius: 99px; display: grid; place-items: center; background: var(--u-accent); color: var(--u-accent-ink); font-size: 14px; }

/* ---------------------------------------------------------------- the FAQ's picture: the free limit as the upscaler shows it */
.limits { margin-top: var(--s-5); max-width: 360px; padding: 18px 20px; display: grid; gap: 14px; font: 400 14px/1.4 var(--font-text); color: var(--u-ink); }
.limits__row { display: flex; justify-content: space-between; gap: var(--s-4); }
.limits__row span { color: var(--u-muted); }
.limits__row b { font-weight: 500; }
.limits__bars i { height: 6px; background: var(--u-accent); }
.limits__bars i.is-used { background: var(--u-fill-3); }
.limits__files { display: flex; flex-wrap: wrap; gap: 6px; }
.limits__files span { padding: 4px 10px; border-radius: 99px; background: var(--u-fill-2); font-size: 13px; }

/* under 360px the bar holds the logo and the menu button only: the hero's own button is on the first screen */
@media (max-width: 359px) {
  .nav:not(.is-open) .nav__actions { display: none; }
  .nav:not(.is-open) .nav__actions + .nav__toggle { margin-left: auto; }
}
@media (max-width: 639px) { .hero .btn-row > .link { align-self: flex-start; width: auto; } }

/* tall desktop screens (a portrait monitor, a big display, a zoomed-out page): a "screen" is held at 960px, so the hero's
   window never stretches into a tower and no section stands in a sea of empty ground */
@media (min-width: 1280px) and (min-height: 1001px) {
  main > .hero { height: 960px; }
  main > :is(section, .section):not(.hero), footer.closing { height: calc(var(--h, 1) * 960px); }
}
