/* Nutriéme page CSS: only what sits inside a visual and the kit lacks. */

/* the client's hexagon logo in the nav and footer, drawn in the accent (the ink on the dark footer) */
.logo-mark { width: 28px; height: 28px; flex: none; fill: none; stroke: var(--p-accent); stroke-width: 2; }
.logo-mark__ray { stroke-width: 1.3; stroke-opacity: .65; }
.nav__logo { display: inline-flex; align-items: center; gap: 10px; }
.ground-inverse .logo-mark { stroke: #c9a961; }
.footer__name { font-size: 48px; letter-spacing: -0.03em; }
.footer__name .logo-mark { width: 44px; height: 44px; }
@media (max-width: 639px) { .footer__name { font-size: 30px; } .footer__name .logo-mark { width: 30px; height: 30px; } }

/* picture-develops: the services photograph on the split's right column, as tall as the list beside it */
.develop { margin: 0; border-radius: var(--r-lg); overflow: hidden; height: min(560px, var(--ly-fit, 560px)); }
.develop > img { display: block; width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 1023px) { .develop { height: auto; aspect-ratio: 2 / 1; margin-top: var(--s-7); } }
@media (min-width: 640px) and (max-width: 1023px) { .develop { aspect-ratio: 5 / 2; } }

/* the four step cards: .g2 below 1280 (the h2 and steps 1-2 on the first screen, 3-4 on the next; a phone
   stacks each pair), one row of four on one screen from 1280 (the groups dissolve into the wrap's 12 columns) */
#proces .panel { --p-h: 280px; }
@media (min-width: 1280px) {
  #proces { --h: 1; }
  #proces > .wrap { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); grid-template-rows: auto; column-gap: 24px; row-gap: 0; align-content: start; }
  #proces .group, #proces .group > .grid, #proces > .wrap > .grid { display: contents; }
  #proces .section-head { grid-column: 1 / -1; }
}
@media (min-width: 640px) and (max-width: 1279px) {
  #proces .grid > .card.span-3 { grid-column: auto / span 6; }
  #proces .panel { --p-h: 300px; }
}
@media (max-width: 639px) { #proces .panel { --p-h: 150px; } }
/* tablets (768x1024, 820x1180) hold the 2x2 on one screen */
@media (min-width: 640px) and (max-width: 1023px) {
  #proces { --h: 1; }
  #proces > .wrap { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); grid-template-rows: auto; column-gap: 24px; row-gap: 24px; align-content: start; }
  #proces .group, #proces .group > .grid, #proces > .wrap > .grid { display: contents; }
  #proces .section-head { grid-column: 1 / -1; }
  #proces .panel { --p-h: 150px; }
}
@media (min-width: 800px) and (max-width: 1023px) { #proces .panel { --p-h: 220px; } }
/* the last step, the launch: its screenshot set inset on the dark ground, cut by the panel's right and bottom */
#proces .panel--inset { background: var(--p-inv-bg); padding: var(--s-5) 0 0 var(--s-5); }
#proces .panel--inset > .frame__img { border-radius: var(--r-md) 0 0 0; object-position: left top; }

/* the tools row under the FAQ's heading */
.tools-row { margin-top: var(--s-3); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-3); max-width: 400px; }
.tools-row > .ic-chip { justify-content: flex-start; }

/* the four work tiles on a tablet: one screen, one grid of 2x2 at 16:9 */
@media (min-width: 640px) and (max-width: 1023px) {
  #lucrari { --h: 1; }
  #lucrari > .wrap { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); grid-template-rows: auto; column-gap: 24px; row-gap: 24px; align-content: start; }
  #lucrari .group, #lucrari .group > .grid, #lucrari > .wrap > .grid { display: contents; }
  #lucrari .section-head { grid-column: 1 / -1; }
  #lucrari .tile.span-6 { grid-column: auto / span 6; }
  #lucrari .tile { --tile-ratio: 16 / 9; }
}

/* work tiles: screenshots at 16:10 */
#lucrari .tile { --tile-ratio: 16 / 10; }
#lucrari .tile__media > img { object-position: left top; }
#lucrari .tile__media > img[style] { object-position: var(--pos); }
#lucrari .tile--next .tile__media > img { object-position: center; }
.faq-more { margin-top: var(--s-5); }

/* the AI diagram's panel: one still diagram on the surface */
.ai-panel { background: var(--p-surface); height: min(480px, var(--ly-fit, 480px)); display: grid; }
.ai-panel > .dg { width: 100%; height: 100%; }
.ai-copy p { max-width: 46ch; }
@media (max-width: 1023px) { .ai-panel { height: 340px; margin-top: var(--s-7); } }
@media (max-width: 639px) { .ai-panel { height: 260px; } }

/* the copy button sits in the close's line, like a text link */
.copy-btn { font: inherit; font-size: var(--t-body); background: none; border: 0; padding: 0; margin-left: var(--s-3); cursor: pointer; color: inherit; }

/* a phone: the work screenshots at 16:9, so the h2 and the first two tiles end on the first screen */
@media (max-width: 639px) { #lucrari .tile { --tile-ratio: 2 / 1; } }

/* the tools row: logos at 28px inside the chips */
.tools-row .ic-chip > .ic { --ic-s: 28px; }

/* from 1024: the four work tiles in one row on one screen, at 4:5 */
@media (min-width: 1024px) {
  #lucrari { --h: 1; }
  #lucrari > .wrap { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); grid-template-rows: auto; column-gap: 24px; row-gap: 0; align-content: start; }
  #lucrari .group, #lucrari .group > .grid, #lucrari > .wrap > .grid { display: contents; }
  #lucrari .section-head { grid-column: 1 / -1; }
  #lucrari .grid > .tile.span-6, #lucrari .tile.span-6 { grid-column: auto / span 3; }
  #lucrari .tile { --tile-ratio: 4 / 5; }
}

/* under 400px the bar holds the logo and the menu only; the main action is the hero's first button */
@media (max-width: 399px) { .nav__actions .btn { display: none; } }

/* the FAQ is two lists so a phone shows it over two screens (.g2m: the heading, the tools and questions 1-2,
   then 3-5). From 640 both lists sit on one grid: the heading and the tools on the left, the questions on the right as one list */
#faq .faq-tools { margin-bottom: var(--s-5); }
@media (min-width: 640px) {
  #faq > .wrap { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; align-content: start; }
  #faq > .wrap > .grid { display: contents; }
  #faq .faq-head { grid-column: 1 / 6; grid-row: 1; }
  #faq .faq-tools { grid-column: 1 / 6; grid-row: 2; margin-top: 0; padding-top: var(--s-5); }
  #faq .faq-1 { grid-column: 7 / 13; grid-row: 1; }
  #faq .faq-2 { grid-column: 7 / 13; grid-row: 2; }
  #faq .faq-2 > .faq__item:first-child { padding-top: var(--s-5); }
}

/* 1024 to 1279 (a 768px-tall screen): the FAQ over two screens, like the phone: the heading, the tools and
   questions 1-2 on the first, 3-5 on the second */
@media (min-width: 1024px) and (max-width: 1279px) {
  #faq { --h: 2; }
  #faq > .wrap { grid-template-columns: none; grid-template-rows: minmax(0, 1fr) minmax(0, 1fr); row-gap: calc(var(--padt) + var(--padb) + var(--bar)); }
  #faq > .wrap > .grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; align-content: start; }
  #faq .faq-1 { grid-row: 1 / 3; }
  #faq .faq-2, #faq .faq-tools { grid-row: 1; }
  #faq .faq-tools { padding-top: 0; }
  #faq .faq-2 > .faq__item:first-child { padding-top: 0; }
}

/* sub-pages (legal pages, credits, 404, the case study): normal flow, not screen-sized sections */
.subpage main { padding-top: var(--nav); }
.page-head { padding: var(--s-9) 0 var(--s-7); }
.page-head h1 { font: var(--display-weight) clamp(38px, 4vw + 12px, 64px)/1.05 var(--font-display); letter-spacing: var(--display-tracking); max-width: 18ch; }
.page-head .t-lead { margin-top: var(--s-5); }
.page-body { padding-bottom: var(--s-10); }
.prose h2 { font: var(--display-weight) 28px/1.2 var(--font-display); margin-top: var(--s-8); }
.prose h2:first-child { margin-top: 0; }
.prose p, .prose li { margin-top: var(--s-4); }
.prose ul { padding-left: 1.2em; }
.subpage-footer { padding: var(--s-9) 0 var(--s-7); }
.case-shot { margin: 0; border-radius: var(--r-lg); overflow: hidden; }
.case-shot > img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; object-position: left top; }
.case-grid, .case-pair { margin-top: var(--s-9); }
.case-grid h2 { font: var(--display-weight) var(--t-h2)/1.1 var(--font-display); letter-spacing: var(--display-tracking); }
.case-cta { margin-top: var(--s-8); }
@media (max-width: 1023px) { .case-pair > .case-shot + .case-shot { margin-top: var(--s-5); } }
.subpage main > section, .subpage footer.footer { height: auto !important; min-height: 0 !important; overflow: visible; }
.subpage main > section.page-head { padding: var(--s-9) 0 var(--s-7); }
.subpage main > section.page-body { padding: 0 0 var(--s-10); }

/* the work tiles' screenshots sit in a <picture> (a 4:5 crop from 1024, the 16:10 screenshot below it) */
#lucrari .tile__media > picture { display: contents; }
#lucrari .tile__media > picture > img { width: 100%; height: 100%; object-fit: cover; object-position: left top; transition: transform 600ms var(--ease); }
#lucrari .tile__media > picture > img[style] { object-position: var(--pos); }
@media (min-width: 1024px) { #lucrari .tile__media > picture > img { object-position: center top; } }
@media (hover: hover) and (pointer: fine) { #lucrari a.tile:hover .tile__media > picture > img { transform: scale(1.03); } }
