@font-face {
  font-family: "Outfit";
  src: url("/assets/fonts/Outfit-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-display: swap;
}

@font-face {
  font-family: "Outfit";
  src: url("/assets/fonts/Outfit-Bold.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
}

/* Page, text, teal, and focus values match brukeravtaler/legal.css. */
:root {
  --fog: #0e100f;
  --page: #fbfaf7;
  --card: #ffffff;
  --text: #202522;
  --muted: #606862;
  --border: #d8ddd8;
  --teal: #246c61;
  --teal-hover: #174f47;
  --focus: #d75e45;
  --display: "Outfit", sans-serif;
  --gutter: clamp(1.25rem, 5vw, 3.5rem);
  --measure: 68rem;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  overflow-x: clip;
  background: var(--page);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
}

h1,
h2 {
  margin: 0;
  font-family: var(--display);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

h2 {
  font-size: clamp(1.9rem, 3.6vw, 2.75rem);
}

p {
  margin: 0;
}

a {
  color: var(--teal);
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--teal-hover);
}

a:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 4px;
}

.sprite {
  position: absolute;
  width: 0;
  height: 0;
}

.skip-link {
  position: fixed;
  z-index: 10;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.55rem 0.8rem;
  background: var(--page);
  color: var(--text);
  transform: translateY(-180%);
}

.skip-link:focus {
  transform: translateY(0);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: inherit;
  font-family: var(--display);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.brand:hover {
  color: inherit;
}

.brand-mark {
  width: 1.05rem;
  height: 1.55rem;
  background: currentColor;
  mask: url("hiker-mark.png") center / contain no-repeat;
}

/* Hero: the map sits under the fog canvas; home.js clears hexagons out of it. */
.hero {
  position: relative;
  display: flex;
  min-height: max(100svh, 40rem);
  flex-direction: column;
  overflow: hidden;
  background: var(--fog);
  color: #fff;
}

.hero-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.masthead,
.hero-grid {
  position: relative;
  width: min(100%, var(--measure) + 2 * var(--gutter));
  margin: 0 auto;
  padding-inline: var(--gutter);
}

.masthead {
  display: flex;
  min-height: 4.5rem;
  align-items: center;
  justify-content: space-between;
}

.masthead-link {
  color: #fff;
  font-weight: 600;
  text-decoration: none;
}

.masthead-link:hover {
  color: #fff;
  text-decoration: underline;
}

.hero-grid {
  display: grid;
  flex: 1;
  grid-template: "copy" auto "stage" minmax(17rem, 1fr) "trip" auto / minmax(0, 1fr);
  padding-block: 1.5rem 1.25rem;
}

.hero-copy {
  grid-area: copy;
  max-width: 34rem;
}

.hero h1 {
  font-size: clamp(2.6rem, 6.4vw, 4.75rem);
}

.hero-lead {
  max-width: 30rem;
  margin-top: 1.25rem;
  color: rgb(255 255 255 / 0.8);
  font-size: clamp(1.0625rem, 1.5vw, 1.25rem);
  line-height: 1.5;
}

.hero-stage {
  grid-area: stage;
}

.stores {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.75rem;
}

.store {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 3.25rem;
  padding: 0 1.4rem 0 1.15rem;
  border-radius: 999px;
  background: #fff;
  color: var(--text);
  font-family: var(--display);
  font-size: 1.0625rem;
  font-weight: 600;
  text-decoration: none;
}

.store:hover {
  background: #e3efec;
  color: var(--text);
}

.store svg {
  width: 1.5rem;
  height: 1.5rem;
  fill: currentColor;
}

/* The demo readout borrows the shape of the app's trip bar. */
.trip {
  grid-area: trip;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.35rem 0.65rem;
  padding: 0.75rem 0.9rem;
  border-radius: 1.25rem;
  background: #ecebe8;
  color: var(--text);
  font-size: 0.9375rem;
  line-height: 1.25;
}

.trip[hidden] {
  display: none;
}

.trip-activity {
  display: grid;
  width: 2.5rem;
  height: 2.5rem;
  place-items: center;
  border-radius: 0.8rem;
  background: var(--teal);
}

.trip-activity svg {
  width: 1.5rem;
  height: 1.5rem;
  fill: #fff;
}

.trip-stats dt,
.trip-hint {
  color: var(--muted);
  font-size: 0.75rem;
}

.trip-stats {
  display: flex;
  gap: 0.7rem;
  margin: 0;
  text-align: center;
  white-space: nowrap;
}

.trip-stats dd {
  margin: 0;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

.trip-hint {
  display: none;
  grid-column: 1 / -1;
}

@media (hover: hover) and (pointer: fine) {
  .trip-hint {
    display: block;
  }
}

@media (min-width: 56rem) {
  /* The copy keeps the page's left edge; the map stage runs to the right edge. */
  .hero-grid {
    grid-template: "copy stage" 1fr "copy trip" auto / minmax(0, 33rem) minmax(0, 1fr);
    column-gap: clamp(1.5rem, 4vw, 4rem);
    width: 100%;
    padding: 1rem 0 2.5rem max(var(--gutter), (100% - var(--measure)) / 2);
  }

  .hero-copy {
    align-self: center;
    padding-bottom: 3rem;
  }

  .hero-stage,
  .trip {
    margin-right: var(--gutter);
  }

  .trip {
    justify-self: end;
    column-gap: 0.9rem;
  }

  .trip-stats {
    gap: 1.25rem;
  }
}

/* Tour: screenshots sit inline by default. home.js opts in to the pinned
   phone, which only takes effect at desktop width. */
.tour,
.more,
.get,
.footer {
  padding-inline: max(var(--gutter), (100% - var(--measure)) / 2);
}

.tour {
  padding-block: clamp(4rem, 9vw, 7rem) 0;
}

.chapter + .chapter {
  margin-top: clamp(4rem, 10vw, 6rem);
}

.chapter-copy {
  max-width: 31rem;
}

.chapter-copy p,
.get p {
  margin-top: 1rem;
  color: var(--muted);
  font-size: 1.125rem;
}

.phone {
  width: min(100%, 19rem);
  margin: 2rem 0 0;
  padding: 0.5rem;
  border-radius: 2.4rem;
  background: var(--fog);
  box-shadow: 0 1.5rem 3rem -1.25rem rgb(14 16 15 / 0.45);
}

.phone img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 1.9rem;
}

@media (min-width: 56rem) {
  .tour.is-pinned {
    --phone: min(20rem, (100vh - 5rem) * 0.495);
    display: grid;
    grid-template-columns: minmax(0, 1fr) var(--phone);
    column-gap: clamp(3rem, 9vw, 8rem);
    padding-block: 0;
  }

  .tour.is-pinned .chapter {
    display: contents;
  }

  .tour.is-pinned .chapter-copy {
    display: flex;
    min-height: 82vh;
    flex-direction: column;
    justify-content: center;
    grid-column: 1;
    justify-self: end;
    width: 100%;
  }

  /* Every phone shares one cell spanning all seven chapter rows. */
  .tour.is-pinned .phone {
    position: sticky;
    top: calc(50vh - var(--phone) * 1.03);
    grid-column: 2;
    grid-row: 1 / span 7;
    align-self: start;
    width: 100%;
    margin: 0;
    opacity: 0;
    transition: opacity 0.3s;
  }

  .tour.is-pinned .chapter.is-active .phone {
    opacity: 1;
  }
}

.more {
  padding-block: clamp(4rem, 9vw, 7rem);
}

.more-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr));
  gap: 0 clamp(2rem, 6vw, 5rem);
  margin: 2rem 0 0;
}

.more-list div {
  padding-block: 1.25rem;
  border-top: 1px solid var(--border);
}

.more-list dt {
  font-family: var(--display);
  font-size: 1.25rem;
  font-weight: 600;
}

.more-list dd {
  max-width: 30rem;
  margin: 0.35rem 0 0;
  color: var(--muted);
}

.get {
  padding-block: clamp(4.5rem, 11vw, 8rem);
  background: var(--fog);
  color: #fff;
}

.get h2 {
  max-width: 14ch;
  font-size: clamp(2.3rem, 5.4vw, 4rem);
}

.get p {
  max-width: 33rem;
  color: rgb(255 255 255 / 0.8);
}

.footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
  padding-block: 2rem;
  background: var(--fog);
  border-top: 1px solid rgb(255 255 255 / 0.14);
  color: rgb(255 255 255 / 0.7);
  font-size: 0.94rem;
}

.footer .brand {
  margin-right: 0.3rem;
  color: #fff;
  font-size: 1.05rem;
  vertical-align: middle;
}

.footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
}

.footer nav a {
  color: rgb(255 255 255 / 0.7);
  text-decoration: none;
}

.footer nav a:hover {
  color: #fff;
  text-decoration: underline;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .tour.is-pinned .phone {
    transition: none;
  }
}
