/* inner pages (built by build/build_inner.py): only what the system does not already do */
:root {
  --font-display: "Schibsted Grotesk", system-ui, sans-serif;
  --font-text: "Schibsted Grotesk", system-ui, sans-serif;
  --display-weight: 400;
  --display-tracking: -0.035em;
  --display-tracking-xl: -0.042em;
  --ly-scale: 0.98;
}
.nav__logo img { display: block; height: 40px; width: auto; }
.nav__link[aria-current="page"] { color: var(--ink); text-decoration: underline; text-underline-offset: 6px; }

/* the breadcrumb is the hero's kicker line */
.crumbs { flex-wrap: wrap; gap: var(--s-2); }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--ink); text-decoration: underline; }
.crumbs [aria-current] { color: var(--ink); }
.hero--split .hero-facts { margin-top: var(--s-7); }

/* rows: a linked name is a full-height tap target */
.rows a.rows__name { display: block; padding-block: var(--s-2); margin-block: calc(-1 * var(--s-2)); }
@media (min-width: 640px) { [data-peek] > .rows a.rows__name { display: inline; padding-block: 0; margin-block: 0; } }
/* rows: a second line under the name */
.rows .rows__name small { display: block; font-weight: 400; color: var(--muted); font-size: var(--t-small); }
.rows--facts .rows__value { text-align: right; }
.stack-4 > h3.t-lead { margin-top: var(--s-4); }

/* a split section: the words on the left, the photograph down the right column to the section's foot */
main > .section > .wrap.split { grid-template-rows: minmax(0, 1fr); align-content: stretch; }
.side { display: flex; flex-direction: column; gap: var(--s-5); align-self: stretch; min-height: 0; }
.side__photo { flex: 1 1 0; min-height: 160px; margin: 0; border-radius: var(--r-lg); overflow: hidden; background: var(--surface); }
.side__photo > img { display: block; width: 100%; height: 100%; object-fit: cover; }
.split > div > :first-child { margin-top: 0; }
#questions .side__photo { min-height: 96px; }

/* the line-up of cars: tiles lift and underline their name */
a.tile { transition: transform 300ms var(--ease); }
a.tile h3 { text-underline-offset: 4px; }
a.tile:hover h3 { text-decoration: underline 1px currentColor; }
@media (hover: hover) and (pointer: fine) { a.tile:hover { transform: translateY(-2px); } }

/* a wide photograph between a head row and its lists */
.route-photo { min-height: 140px; margin-bottom: var(--s-6); }
.route-photo > img { object-position: 50% 62%; }

/* the cars are cut-outs: shown whole on the page's surface, never cropped */
.frame--car { aspect-ratio: 16 / 9; align-self: start; background: var(--surface); }
.frame--car > .frame__img, .tile__media > img { object-fit: contain; }
@media (min-width: 1024px) { #fleet .tile__media { aspect-ratio: auto; height: calc(100svh - 426px); } #groups .tile__media { aspect-ratio: auto; height: calc(100svh - 460px); } }
@media (min-width: 640px) and (max-width: 1279px) { #services .rows p { display: none; } }
.rows--tight > li { padding-block: var(--s-3); }

/* booking: the photograph down the right column */
.book-photo { align-self: stretch; min-height: 200px; }

@media (min-width: 640px) and (max-width: 1023px) {
  /* stacked: the words, then the photograph takes what the screen leaves */
  main > .section > .wrap.split { grid-template-rows: auto minmax(0, 1fr); }
  .side { margin-top: var(--s-6); }
  .book-photo { margin-top: var(--s-6); }
  #fleet .tile__media { aspect-ratio: auto; height: calc(50svh - 279px); }
  #groups .tile__media { aspect-ratio: auto; height: calc(50svh - 318px); }
  .frame--car { aspect-ratio: auto; height: calc(100svh - 773px); }
  #sedans .section-head > p { display: none; }
}
@media (max-width: 639px) {
  main > .section > .wrap.split { grid-template-rows: auto minmax(0, 1fr); }
  .side { margin-top: var(--s-5); }
  .book-photo { margin-top: var(--s-5); }
  .route-photo { flex: 1 1 0; min-height: 120px; }
  .tile > p:not(.tile__facts) { display: none; }
  .tile__media { aspect-ratio: 16 / 9; }
  #sedans .grid.fill { grid-template-rows: auto minmax(220px, 1fr); }
  #groups .tile__facts { display: none; }
  .frame--car { aspect-ratio: auto; align-self: stretch; }
}

/* a short laptop screen (1024x768, 1280x720): the hero drops its fact line, the form widens, side lines go */
@media (min-width: 1024px) and (max-height: 820px) {
  .hero--split .hero-facts { display: none; }
  #sedans .section-head > p { display: none; }
}

/* phone and tablet: a photograph beside the words keeps its own shape once the words stack above it,
   never stretched down a column 800-1000px tall; the section grows with its content instead */
@media (max-width: 1023px) {
  main > .section > .wrap.split { grid-template-rows: auto; }
  .side { align-self: start; }
  main > .section .wrap :is(.side__photo, .route-photo, .frame--photo.fill) { flex: none; height: auto; min-height: 0; aspect-ratio: 4 / 3; }
  main > .section .wrap .route-photo.frame--photo.fill { aspect-ratio: 16 / 9; }
  main > .section:has(.side__photo, .route-photo, .frame--photo.fill) { --h: 1 !important; --hm: 1 !important; }
}
