/* MonoIT site layer: the rules every page shares. Loaded after the kit's stylesheets (assets/*.css, which are
   the design-taste kit's own files and are never edited), so these are page CSS shared by the pages.
   DESIGN.md (repo root) lists the system they sit on. */

/* ---------------------------------------------------------------- the nav on a service page
   The kit draws a 2px bar under the nav word of the page you are on (aria-current="page"). A service page
   (services/*.html) is not the Services page itself, so its Services word carries aria-current="true" (the
   current section) and gets the same bar, at the same insets. */
.nav__link[aria-current="true"]::after { content: ""; position: absolute; left: var(--s-3); right: var(--s-3); bottom: -2px; height: 2px; border-radius: 2px; background: currentColor; }
@media (min-width: 1024px) and (max-width: 1279px) { .nav__link[aria-current="true"]::after { left: var(--s-2); right: var(--s-2); } }
@media (max-width: 1023px) { .nav.is-open .nav__link[aria-current="true"]::after { left: 0; right: auto; width: 24px; bottom: 10px; } }

/* ---------------------------------------------------------------- the photo hero on a tablet and a phone
   layout.css resets the words to the page's ink below 1024px with .hero--photo[data-tone] (0,2,0), which its own
   desktop rule .hero--photo[data-box="none"][data-tone="dark"] (0,3,0) outweighs, so the words stayed white on the
   light ground under the photograph. The same reset at that weight. */
@media (max-width: 1023px) {
  .hero--photo[data-box="none"][data-tone="dark"] {
    color: var(--p-ink); --ink: var(--p-ink); --muted: var(--p-muted);
    --line: color-mix(in oklab, var(--p-ink) 11%, transparent); --line-strong: color-mix(in oklab, var(--p-ink) 20%, transparent);
  }
}

/* ---------------------------------------------------------------- the film hero's words box
   layout.css gives the box the inverse ground and its buttons the inverse action (a light button), so a film hero
   showed the one primary action in two colours on one screen (the nav's blue and the box's light). The box's
   primary keeps the page's one primary look; its secondary stays the inverse one. */
.hero__over > :first-child { --action: var(--p-action); --action-ink: var(--p-action-ink); }

/* ---------------------------------------------------------------- a short laptop screen
   The kit sizes a desktop section to a 900px screen (708px of content). On a shorter one (1366x768, 1280x720,
   1536x864) a full section ran into the next, so there a section keeps at least its screens and grows past them,
   as the kit does from 640 to 1279. */
@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 grid that is a section's .fill (its photograph runs to the section's foot) holds words too: where a section
   grows (a phone, a tablet, a short screen) the grid grows with them instead of letting them run out of it */
@media (max-width: 1279px) { main > section > .wrap > .grid.fill { flex: 1 0 auto; } }

/* a stat or a spec value is set once, never counted up or lined up in a column of figures: proportional figures,
   so Schibsted's tabular full stop, comma and colon open no gaps ("99.97%", "Friday, 8:00") */
.t-stat, .rows__value { font-variant-numeric: proportional-nums; }
@media (min-width: 1280px) and (max-height: 899px) { main > section > .wrap > .grid.fill { flex: 1 0 auto; } }

/* ---------------------------------------------------------------- the secondary button
   The dealt tonal secondary is an 8% tint of the ink with no outline: 1.18:1 off the sand and off the film hero's
   dark box, where it read as plain words. A hairline in the ink (28%, about 1.7:1 on the sand and 2.2:1 on the
   dark box) draws its edge; the tint and the motion layer's hover (its border to 32%) stay as dealt. */
html[data-buttons="tonal"] .btn--secondary { border-color: color-mix(in oklab, var(--ink) 28%, transparent); }

/* ---------------------------------------------------------------- lists of links
   A name in .rows that is a link: its line runs under the name only, not across the row, so the row's own
   hairline below stays the one rule between rows. */
.rows__name.link { justify-self: start; }
/* a contact row is one link: the tile, the name and the line under it are all the target; the name's line draws
   and its arrow nudges when any part of the row is hovered or focused (the .link motion, from the row) */
.ic-row__link { display: flex; align-items: center; gap: 14px; flex: 1; min-width: 0; color: inherit; text-decoration: none; border-radius: var(--r-sm); }
.ic-row__link .link { min-height: 0; justify-self: start; max-width: 100%; }
html:not([data-motion="off"]) .ic-row__link:is(:hover, :focus-visible) .link { background-size: calc(100% - 1em - var(--s-2)) 1px, calc(100% - 1em - var(--s-2)) 1px; transition-duration: var(--m-in); }
@media (hover: hover) and (pointer: fine) { html:not([data-motion="off"]) .ic-row__link:hover .link::after { transform: translateX(3px); transition-duration: var(--m-in); } }

/* ---------------------------------------------------------------- the assessment form
   The booking form on the second ground, 48px in (sections-library.md, booking-form). */
.form-card { padding: 48px; border-radius: var(--r-lg); background: var(--bg); }
@media (max-width: 639px) { .form-card { padding: 24px; } }
/* the one check box the contact endpoint needs: the box and its words on one 44px row */
.field--check { grid-template-columns: 24px minmax(0, 1fr); align-items: center; column-gap: var(--s-3); }
.field--check input { width: 24px; height: 24px; margin: 0; accent-color: var(--action); }
.field--check label { display: flex; align-items: center; min-height: 44px; font-size: var(--t-body); font-weight: 400; }
.field--check .field__error { grid-column: 1 / -1; }
/* a phone: first and last name (.field--pair) share a row, so the form fits its screen; every other field is full */
@media (max-width: 639px) {
  .form:has(> .field--pair) { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--s-3); }
  .form:has(> .field--pair) > .field:not(.field--pair) { grid-column: 1 / -1; }
}

/* ---------------------------------------------------------------- a plain page (sitemap, credits, not found)
   One heading and its links on the page's ground: no hero picture, the words on the container's left line.
   The list: each page (or each photograph's source page) as a link, then one line about it (its author and
   licence), two columns under a hairline; a group of them under a small label (the sitemap) */
.page-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--gutter); row-gap: var(--s-3); align-content: start; }
.page-list > li { display: grid; gap: 0; border-top: 1px solid var(--line); padding-top: var(--s-2); }
.page-list > li > .link { justify-self: start; }
.page-list p { margin: 0; font-size: var(--t-small); color: var(--muted); }
.page-list p a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.page-group > .t-label { margin: 0 0 var(--s-3); color: var(--muted); }
/* a phone: one column, and a licence link under a photograph's name is a 44px target of its own (a transparent
   layer 12px past its words, so its drawn underline stays under them), clear of the name's link above it */
@media (max-width: 639px) {
  .page-list { grid-template-columns: 1fr; }
  .page-list > li { row-gap: 12px; }
  .page-list p a { position: relative; }
  .page-list p a::before { content: ""; position: absolute; inset: -12px -4px; }
}
