/* Argent's page CSS, linked after the taste kit (public/assets) and the palette block. The kit
   is the one system (grid, type, buttons, cards, motion); this file only holds what the kit
   leaves to the page: the insides of a few visuals and the inner pages' column. */

/* the logo: the Road mark beside the name in the display face (the kit sets the name's size) */
.nav__logo > .logo-mark { display: block; flex: none; width: 30px; height: 30px; }
.nav__logo { gap: 10px; }
.footer__mark > .logo-mark { flex: none; width: 0.92em; height: 0.92em; margin-right: 0.24em; }
@media (max-width: 639px) { .nav__logo > .logo-mark { width: 26px; height: 26px; } .nav__logo { gap: 8px; } }

/* the hero's photograph fills its stage: the kit covers a bare <img>; ours sits in a <picture> so a
   tablet and a phone get the 4:3 frame */
.hero--product .hero__stage > picture { position: absolute; inset: 0; }
.hero--product .hero__stage > picture > img { width: 100%; height: 100%; max-width: none; object-fit: cover; object-position: var(--ly-pos, 50% 50%); }
@media (max-width: 639px) { .hero--product .hero__stage > picture > img { object-position: 34% 50%; } }

/* the nav panel's photograph card: 4:3 */
.menu-card .panel { --ratio: 75%; }
.menu-card .t-card { font-size: 16px; }

/* a photograph that is a link (its hover is the kit's m-zoom) */
a.pl-photo { display: block; overflow: hidden; }
a.pl-photo > img { width: 100%; height: auto; }

/* a lone phone link is a 44px tap target on a phone */
.tap { display: inline-flex; align-items: center; min-height: 44px; }

/* a head row on the grid: the h2 on the left line, one line (and its link) on the split line,
   their tops level (layout-v4.md, SR-8) */
.head-row { align-items: start; margin-bottom: var(--head-gap); }
.head-row > p { font-size: var(--t-body); line-height: 1.5; }
@media (max-width: 1023px) {
  .head-row { row-gap: var(--s-4); }
  .head-row > p > .link { display: flex; width: max-content; margin-top: var(--s-2); }
}
@media (max-width: 639px) {
  /* a head row keeps its h2 and its link; the line beside them is the desktop's */
  .head-row__line { display: none; }
  .head-row > p > .link { margin-top: 0; }
}

/* the hours list sits on its column's top line */
.hours { margin: 0; }

/* group labels over rows: 12px of air, no rule */
.rows { margin-top: var(--s-3); }

/* the two groups of the "includes" section: side by side in the text column; on a phone each row
   is its name over its value */
.groups { display: grid; gap: var(--s-6); align-content: start; }
.groups--two { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gutter); }
@media (max-width: 639px) {
  .groups .rows > li { grid-template-columns: minmax(0, 1fr); }
  .groups .rows__value { grid-column: 1; grid-row: auto; text-align: left; max-width: none; color: var(--muted); }
}

/* the two larger cars on the dark band: 3:2, so the pair and its head hold one screen */
#larger .tile { --tile-ratio: 3 / 2; }

/* the pickup block's words: one column, 32px between its parts */
.visit-text { display: grid; gap: var(--s-6); align-content: start; }
.visit-text > .section-head { margin-bottom: 0; }
.visit__address a { text-decoration: underline; text-underline-offset: 0.18em; text-decoration-thickness: 1px; }

/* the footer's address column reads like its link columns */
.foot-address { font-style: normal; font-size: var(--t-small); line-height: 1.9; margin-bottom: var(--s-2); }
/* the legal row's two links, a gap from the name */
.footer__legal > span > a { margin-left: var(--s-4); }

/* the focus ring in ink: the kit draws it in the action colour, which is too faint on white here
   (orange on white is 2.3 to 1; a focus change needs 3 to 1) */
:focus-visible { outline-color: var(--ink); }

/* the questions block: the words, then one photograph under them, 32px apart */
.faq-text { display: grid; gap: var(--s-6); align-content: start; }
.faq-text > .section-head { margin-bottom: 0; }

/* ---------------------------------------------------------------- inner pages
   Sub-pages hold long copy (prices, questions, a car's details), so they read as documents on
   the kit's column: main > div.page, not the one-screen sections of the home page. */
.page { padding: calc(var(--nav) + var(--s-8)) 0 var(--s-9); }
.page > .wrap { display: grid; gap: var(--s-8); }
.page__head { display: grid; gap: var(--s-4); max-width: 760px; }
.page__head > p { font-size: var(--t-lead); line-height: 1.5; max-width: 60ch; }
.page__block { display: grid; gap: var(--s-5); }
.page__block > h2 { font-size: var(--t-h3); }
.prose { display: grid; gap: var(--s-4); max-width: 68ch; }
.prose h2 { font-size: var(--t-h3); margin-top: var(--s-5); }
.prose ul { list-style: disc; padding-left: 1.2em; display: grid; gap: var(--s-2); }
.prose ol { list-style: decimal; padding-left: 1.2em; display: grid; gap: var(--s-2); }
.prose a { text-decoration: underline; text-underline-offset: 3px; }
.crumbs { display: flex; gap: var(--s-2); font-size: var(--t-small); color: var(--muted); }
.crumbs a:hover { color: var(--ink); }

/* a car's gallery: the cover, then a wall of the rest from line to line */
.wall { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2px; }
.wall > a { display: block; overflow: hidden; aspect-ratio: 4 / 3; }
.wall > a > img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 639px) { .wall { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* a car's name in a tile on the fleet page (an h2 under the page's h1) reads at card size, as on the home page */
.tile__head > h2 { font: 500 var(--t-card)/1.3 var(--font-text); letter-spacing: -0.01em; }
/* two-up tiles on a phone: the name over the price */
@media (max-width: 639px) { .page .tile__head { flex-direction: column; gap: 0; } }
.cover { margin: 0; overflow: hidden; aspect-ratio: 3 / 2; background: var(--surface); }
.cover > img { width: 100%; height: 100%; object-fit: cover; }

/* the booking card beside a car's details, and plain panels on the alt ground */
.aside-card { background: var(--p-surface); padding: var(--s-6); display: grid; gap: var(--s-4); align-content: start; }
.aside-card .price { font: var(--display-weight) var(--t-h2)/1.1 var(--font-display); letter-spacing: var(--display-tracking); }
.split-aside { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s-7); align-items: start; }
@media (min-width: 1024px) { .split-aside { grid-template-columns: minmax(0, 1fr) 384px; } }
.kv { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 var(--s-5); }
@media (min-width: 640px) { .kv { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.kv > div { padding-block: var(--s-4); border-bottom: 1px solid var(--line); }
.kv dt { font-size: var(--t-label); font-weight: 500; color: var(--muted); }
.kv dd { margin: 0; }
.table-scroll { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.table th { text-align: left; font-size: var(--t-label); font-weight: 500; color: var(--muted); padding: var(--s-3) var(--s-4) var(--s-3) 0; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: var(--s-4) var(--s-4) var(--s-4) 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.sum { display: grid; gap: var(--s-3); }
.sum > div { display: flex; justify-content: space-between; gap: var(--s-5); }
.sum > .sum__total { font-weight: 500; font-size: var(--t-lead); padding-top: var(--s-3); border-top: 1px solid var(--line-strong); }

/* the embedded booking widget's frame */
.widget { border: 1px solid var(--line); }
.widget__bar { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s-3); padding: var(--s-3) var(--s-5); font-size: var(--t-small); color: var(--muted); }
.widget__bar + * { border-top: 1px solid var(--line); }
.widget > * + .widget__bar { border-top: 1px solid var(--line); }

/* forms outside the kit's booking form keep its field look */
.form--inline { display: grid; gap: var(--s-4); grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); align-items: end; }
.form--inline .field--wide { grid-column: 1 / -1; }
.check { display: flex; gap: var(--s-3); align-items: flex-start; font-size: var(--t-small); }
.check input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--action); flex: none; }

/* ---------------------------------------------------------------- the tablet, held upright (640 to 1023)
   Each section is planned again for 768x1024 and 820x1180 (layout-v4.md, The tablet). */
@media (min-width: 640px) and (max-width: 1023px) {
  /* head rows stack: the h2, then its line, both on the left line */
  .head-row > * { grid-column: 1 / -1; }
  /* cars: a two-by-two, the head as the first cell */
  #fleet > .wrap { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s-7) var(--gutter); align-items: start; }
  #fleet .head-row { display: grid; gap: var(--s-4); margin-bottom: 0; }
  #fleet > .wrap > .grid:not(.head-row) { display: contents; }
  #fleet > .wrap a.tile { grid-column: auto; }
  /* the two larger cars side by side, taller than wide so the pair fills the band */
  #larger .grid > a.tile { grid-column: auto / span 6; --tile-ratio: 4 / 5; }
  /* includes and pickup: the words across the column, the photograph a wide band under them */
  #included .grid > .groups { grid-column: 1 / -1; }
  #included .pl-photo > img { aspect-ratio: 2; }
  /* pickup: the photograph takes what the words leave, down to the section's foot */
  #visit > .wrap > .grid { display: flex; flex-direction: column; flex: 1 0 auto; }
  #visit .visit-photo { display: flex; flex-direction: column; flex: 1 1 0; min-height: 280px; }
  #visit .visit-photo > img { flex: 1 1 0; min-height: 0; width: 100%; height: auto; aspect-ratio: auto; object-fit: cover; object-position: 50% 42%; }
  /* questions take two screens: the words and the photograph on the first, the five answers on
     the second (the kit's two-screen split, written here because .g2 would apply on a desktop too) */
  #questions { --h: 2; }
  #questions .grid { grid-template-rows: calc(100svh - var(--padt) - var(--padb) - var(--bar)) auto; row-gap: calc(var(--padt) + var(--padb) + var(--bar)); }
  #questions .faq-photo > img { aspect-ratio: 4 / 3; }
  /* the close's big button runs across the column on a tablet */
  .closing__cta.close--type > .btn--xl:not(.btn--wide) { width: 100%; }
}

/* ---------------------------------------------------------------- the phone (under 640) */
@media (max-width: 639px) {
  /* the display face a little narrower on a phone (its own width axis), so a long headline still
     holds two lines in the hero */
  :root { --display-stretch: 82%; }
  /* the hero keeps the one action; "See the cars" is the next screen */
  .hero--product .btn-row > .btn--secondary { display: none; }
  /* the stage a little shorter than the kit's 4:5, so the head and the photograph hold one screen */
  .hero--product .hero__stage { aspect-ratio: 5 / 6; }
  /* the three cars hold one screen: the Envista across the column, the other two under it two-up,
     each its name and price (the facts and the line are on the car's own page) */
  #fleet .grid > a.tile { grid-column: auto / span 6; --tile-ratio: 4 / 3; }
  #fleet .grid > a.tile:first-of-type { grid-column: 1 / -1; --tile-ratio: 2.2 / 1; }
  #fleet .grid:not(.head-row) { row-gap: var(--s-5); }
  #fleet .tile__head, #larger .tile__head { flex-direction: column; gap: 0; }
  #fleet .tile > p:not(.tile__facts) { display: none; }
  #fleet .grid > a.tile:not(:first-of-type) .tile__facts { display: none; }
  /* the two larger cars stand two-up, square */
  #larger .grid > a.tile { grid-column: auto / span 6; --tile-ratio: 1 / 1; }
  /* includes: tighter rows and a wide band of the photograph, so the block holds one screen */
  #included .groups .rows > li { padding-block: 10px; }
  #included .pl-photo > img { aspect-ratio: 2.4; }
  /* pickup: tighter rhythm and a wider photograph, so the block holds one screen */
  .visit-text { gap: var(--s-5); }
  /* delivery and its price are in the includes block on a phone */
  .visit-rows { display: none; }
  #visit .pl-photo > img { aspect-ratio: 2.2; object-position: 50% 42%; }
  /* questions: two screens, the photograph tall so the second is filled */
  #questions { --hm: 2; }
  #questions .faq-photo > img { aspect-ratio: 4 / 5; }
  /* the footer's second screen: the cars are in the menu and on the page, so their column and the
     line under the logo stay on the desktop; the legal row sits on the two column lines */
  .footer__col--cars, .closing__links .footer__lede { display: none; }
  .footer__legal { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--gutter); row-gap: 0; align-items: center; }
  .footer__legal > span { display: contents; }
  .footer__legal > span > a { margin-left: 0; }
  .footer__legal .legal__name, .footer__legal > .credits { grid-column: 1 / -1; }
}

/* ---------------------------------------------------------------- the cookie notice
   Shown only once analytics ids are set: a plain bar fixed to the foot of the screen, over the
   phone's action bar. */
.consent { position: fixed; z-index: 60; left: 0; right: 0; bottom: 0; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s-4) var(--s-6); padding: var(--s-4) max(var(--s-5), calc((100vw - 1200px) / 2)); background: var(--bg); border-top: 1px solid var(--line-strong); font-size: var(--t-small); }
.consent > p { margin: 0; max-width: 60ch; }
.consent > p > a { text-decoration: underline; text-underline-offset: 0.15em; }

/* ---------------------------------------------------------------- short desktop windows
   The kit fixes each section to one screen from 1280 wide up, planned for a 900px-tall window. On a
   shorter window (most laptops) the content cannot fit, and a fixed height lays its last rows over
   the next block. So under 900px tall a section keeps at least its screen and grows with its content,
   exactly as the kit already does from 640 to 1279 wide. */
@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);
    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; }
}
