/* The landing page (web/index.html), on top of site.css. */
main > section { max-width: 68rem; margin-inline: auto; padding-left: var(--gutter); padding-right: var(--gutter-r); }

/* Intro: the name in the map's area-name capitals, then the two paragraphs from /about. */
.intro { display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; padding-block: clamp(24px, 5vw, 52px) clamp(28px, 4vw, 44px); }
.intro h1 { font-size: clamp(2.3rem, 7.2vw, 4.6rem); letter-spacing: .16em; text-transform: uppercase; margin-left: -.04em; }
.lead { display: grid; gap: 14px; max-width: 40rem; font-size: clamp(1.08rem, 1.6vw, 1.22rem); }
.lead p:first-child { font-size: 1.12em; }

/* Map pictures: each links to the map at its view. Captions are written like the map's water and ice names. */
figure { margin: 0; position: relative; }
figure a { display: block; height: 100%; }
/* Shown 1:1, cropped around the centre, so the labels are the size they are on the map. */
figure img { display: block; width: 100%; height: 100%; max-width: 100%; object-fit: none; }
figcaption { position: absolute; left: 12px; bottom: 12px; padding: 5px 10px 6px; border-radius: 3px; background: var(--paper);
  box-shadow: 0 1px 3px rgba(29, 29, 27, .25); font: italic 600 .95rem/1.2 var(--serif); color: var(--water); letter-spacing: .03em; pointer-events: none; }
.hero-map { height: clamp(300px, 67vw, 960px); max-width: 2000px; margin-inline: auto; border-block: 1px solid var(--line); overflow: hidden; }
.hero-map figcaption { left: var(--gutter); bottom: 16px; font-size: 1.1rem; }
.hero-map figcaption::after { content: "Opna kortið hér"; display: block; margin-top: 2px; font: 600 .78rem/1.2 var(--sans); color: var(--road); letter-spacing: .02em; }
.hero-map img { object-position: 50% 45%; }

/* The three ways, each under a stretch of F-road. */
.ways { display: grid; grid-template-columns: minmax(0, 1fr); gap: 26px; padding-block: clamp(40px, 7vw, 76px); }
.routes { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(15rem, 100%), 1fr)); gap: 32px clamp(24px, 4vw, 48px); }
.routes article { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.routes article::before { content: ""; display: block; height: 6px; border-radius: 3px; margin-bottom: 8px; background: var(--froad); }
.routes p { color: var(--muted); flex: 1; }
.more { font-weight: 600; align-self: flex-start; }
.more::after { content: " \2192"; }

/* The two maps, side by side, on a band of the map's land colour. The whole country at
   1:1 where it fits, scaled down where it doesn't. */
.variant figure img { object-fit: scale-down; }
.maps { display: grid; grid-template-columns: minmax(0, 1fr); gap: 26px; padding-block: clamp(40px, 7vw, 76px); }
main > .maps { max-width: none; background: var(--terrain); }
.maps > * { width: 100%; max-width: calc(68rem - 32px); margin-inline: auto; }
.pair { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(17rem, 100%), 1fr)); gap: 32px clamp(24px, 4vw, 48px); }
.variant { display: grid; gap: 10px; align-content: start; min-width: 0; }
.variant figure { aspect-ratio: 7 / 5; max-width: 100%; overflow: hidden; border-radius: 4px; box-shadow: 0 0 0 1px rgba(29, 29, 27, .12); margin-bottom: 8px; }
.variant p { color: var(--muted); max-width: 34rem; }
.aside { color: var(--muted); font-size: .95rem; }

@media (prefers-reduced-motion: no-preference) {
  .hero-map img, .variant img { transition: transform .6s ease; }
  .hero-map a:hover img, .variant a:hover img { transform: scale(1.015); }
}
