/* The landing page: hero with the app mock in front of the logo's diamond,
   the features grid, and the card to get the app. A wider column than the
   other pages (1120px), so the language selector moves with it. */
html {
  scroll-behavior: smooth;
}

/* The logo's diamond is wider than the phone's column: never a sideways
   scroll because of it. */
body {
  overflow-x: clip;
  background: var(--wash);
}

h1,
h2,
h3 {
  margin: 0;
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -.02em;
  text-wrap: balance;
}

p {
  margin: 0;
}

.home-top,
.home,
.site-footer {
  width: min(calc(100% - 40px), 1120px);
  margin: 0 auto;
}

.home-top {
  padding-top: 32px;
}

.language-selector {
  right: max(20px, calc((100% - 1120px) / 2));
}

:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 3px;
}

/* Buttons */
.home-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 26px;
  border: 2px solid transparent;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  transition: background-color .15s ease, border-color .15s ease;
}

.home-button__icon {
  width: 20px;
  height: 20px;
}

.home-button--primary {
  color: var(--on-primary);
  background: var(--primary);
}

.home-button--primary:hover {
  background: #57438f;
}

.home-button--secondary {
  border-color: var(--line);
  color: var(--ink);
  background: var(--surface);
}

.home-button--secondary:hover {
  border-color: var(--primary);
}

/* Hero */
.home-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
  align-items: center;
  gap: 40px;
  padding: 16px 0 64px;
}

.home-hero__text {
  display: grid;
  justify-items: start;
  gap: 24px;
}

.home-hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  padding: 8px 16px 8px 12px;
  border-radius: 999px;
  color: var(--ink);
  background: var(--lilac);
  font-size: .95rem;
  font-weight: 700;
}

.home-hero__eyebrow-icon {
  width: 20px;
  height: 20px;
  color: var(--primary);
}

/* Long words, like German compounds, break instead of widening the page. */
.home-hero__heading {
  font-size: clamp(2.5rem, 2.6vw + 1.2rem, 4rem);
  line-height: 1;
  letter-spacing: -.035em;
  overflow-wrap: break-word;
  hyphens: auto;
}

.home-hero__line {
  display: block;
}

.home-hero__line--accent {
  margin-top: .14em;
  color: var(--primary);
}

.home-hero__lead {
  max-width: 34em;
  color: var(--muted);
  font-size: 1.2rem;
  line-height: 1.6;
}

.home-hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 4px;
}

/* The phone in front of the logo's diamond. */
.home-hero__visual {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 680px;
}

.home-hero__shape {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(720px, 145%);
  height: auto;
  transform: translate(-44%, -53%);
}

.home-hero__shape-frame { fill: var(--logo-frame); }
.home-hero__shape-night { fill: var(--logo-night); }
.home-hero__shape-foam { fill: var(--logo-foam); }
.home-hero__shape-water { stop-color: var(--logo-water); }
.home-hero__shape-deep { stop-color: var(--logo-deep); }

.home-hero__visual .app-mock {
  transform: rotate(3deg);
}

/* Section head */
.home-section-head {
  display: grid;
  justify-items: start;
  gap: 14px;
  margin-bottom: 32px;
}

.home-section-head__eyebrow {
  padding: 6px 14px;
  border-radius: 999px;
  color: var(--ink);
  background: var(--lilac);
  font-size: .85rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.home-section-head__heading {
  max-width: 16em;
  font-size: clamp(2rem, 2.4vw + 1rem, 3.1rem);
}

/* Features */
.home-features {
  padding: 24px 0 8px;
  scroll-margin-top: 24px;
}

.home-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.home-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--surface);
}

.home-card--wide {
  grid-column: span 2;
}

/* The page's one highlight card. */
.home-card--highlight {
  border-color: var(--primary);
  color: var(--on-primary);
  background: var(--primary);
}

.home-card--highlight .home-card__text {
  color: var(--on-primary);
}

.home-card--row {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: 28px;
}

.home-card__body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
}

.home-card__tile {
  display: grid;
  flex: none;
  place-items: center;
  width: 56px;
  height: 56px;
  margin-bottom: 4px;
  border-radius: 18px;
  color: var(--on-tile);
}

.home-card__tile--amber { background: var(--amber); }
.home-card__tile--rose { background: var(--rose); }
.home-card__tile--lilac { background: var(--lilac); }
.home-card__tile--periwinkle { background: var(--periwinkle); }

.home-card__tile--water {
  color: var(--on-water);
  background: var(--water);
}

.home-card__tile--primary {
  color: var(--on-primary);
  background: var(--primary);
}

.home-card__icon {
  width: 28px;
  height: 28px;
}

.home-card__title {
  font-size: 1.5rem;
  line-height: 1.15;
}

.home-card__text {
  color: var(--muted);
}

.home-card--wide .home-card__text {
  max-width: 40em;
}

/* The highlight card: the text beside the map markers' badges. */
.home-card--split {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  align-items: center;
  gap: 28px;
}

.home-legend {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.home-legend__item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 8px 16px 8px 10px;
  border-radius: 18px;
  color: var(--primary);
  background: var(--on-primary);
  font-weight: 700;
}

/* A marker as on the app's map: the logo with an amber badge in a corner. */
.home-legend__marker {
  position: relative;
  flex: none;
  width: 44px;
  height: 44px;
}

.home-legend__logo {
  display: block;
  width: 100%;
  height: 100%;
}

.home-legend__badge {
  position: absolute;
  display: grid;
  place-items: center;
  width: 42%;
  height: 42%;
  border-radius: 999px;
  color: var(--amber);
  background: var(--surface);
  box-shadow: 0 0 0 1px var(--line);
}

.home-legend__badge--top-right { top: 0; right: 0; }
.home-legend__badge--top-left { top: 0; left: 0; }
.home-legend__badge--bottom-left { bottom: 0; left: 0; }

.home-legend__badge-icon {
  width: 80%;
  height: 80%;
  stroke-width: 3;
}

/* Weather: a few hours of a sample forecast, the wind and the rain. */
.home-weather {
  display: grid;
  gap: 10px;
  margin-top: auto;
  padding-top: 6px;
}

.home-weather__hours {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.home-weather__hour {
  display: grid;
  justify-items: center;
  gap: 4px;
  padding: 10px 4px;
  border-radius: 16px;
  background: var(--wash);
}

.home-weather__time {
  color: var(--muted);
  font-size: .8rem;
  font-weight: 600;
}

.home-weather__icon {
  width: 28px;
  height: 28px;
  color: var(--muted);
}

.home-weather__icon--sun {
  color: #c78a00;
  fill: var(--amber);
}

.home-weather__icon--cloud-sun {
  color: var(--water);
}

.home-weather__temperature {
  font-size: 1.1rem;
  font-weight: 800;
}

.home-weather__extra {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  color: var(--muted);
  font-size: .92rem;
  font-weight: 600;
}

.home-weather__extra span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.home-weather__small-icon {
  width: 18px;
  height: 18px;
  color: var(--water);
}

/* Reviews: the stars, a like and "Write a review". */
.home-review {
  display: grid;
  gap: 12px;
  margin-top: auto;
  padding-top: 6px;
}

.home-review__stars {
  display: flex;
  align-items: center;
  gap: 4px;
}

.home-review__star {
  width: 28px;
  height: 28px;
  color: var(--line);
  fill: var(--line);
}

.home-review__star--on {
  color: var(--amber);
  fill: var(--amber);
}

.home-review__average {
  margin-left: 10px;
  font-size: 1.6rem;
  font-weight: 800;
  line-height: 1;
}

.home-review__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.home-review__like,
.home-review__write {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: .92rem;
  font-weight: 700;
}

.home-review__like {
  padding-left: 10px;
  color: var(--primary);
  background: var(--lilac);
}

.home-review__like-icon {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.home-review__write {
  border: 1.5px solid var(--line);
  color: var(--primary);
}

/* Favorites and notifications: both turned on. */
.home-toggles {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
  padding-top: 6px;
}

.home-toggles__toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px 8px 12px;
  border-radius: 999px;
  color: var(--on-primary);
  background: var(--primary);
  font-weight: 700;
}

.home-toggles__icon {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

/* Visits: the "I'm here" button and the visit count. */
.home-visit {
  display: grid;
  justify-items: start;
  gap: 10px;
  margin-top: auto;
  padding-top: 6px;
}

.home-visit__button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px 8px 14px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  color: var(--primary);
  font-weight: 700;
}

.home-visit__icon {
  width: 20px;
  height: 20px;
}

.home-visit__count {
  color: var(--muted);
  font-size: .92rem;
  font-weight: 600;
}

/* Add a park: the pin in its 1 km ring. */
.home-radius {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: auto;
  padding-top: 6px;
}

.home-radius__ring {
  position: relative;
  display: grid;
  flex: none;
  place-items: center;
  width: 96px;
  height: 96px;
  border: 2px dashed var(--primary);
  border-radius: 999px;
  background: var(--lilac);
}

.home-radius__pin {
  width: 36px;
  height: 36px;
  color: var(--primary);
}

.home-radius__label {
  position: absolute;
  right: -14px;
  bottom: -4px;
  padding: 2px 9px;
  border-radius: 999px;
  color: var(--on-primary);
  background: var(--primary);
  font-size: .8rem;
  font-weight: 800;
}

.home-radius__caption {
  color: var(--muted);
  font-size: .92rem;
  font-weight: 600;
}

/* Settings: the languages and the themes. */
.home-settings {
  display: grid;
  justify-items: start;
  gap: 14px;
}

.home-languages {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.home-languages li {
  padding: 8px 18px;
  border-radius: 999px;
  color: var(--ink);
  background: var(--lilac);
  font-size: 1.05rem;
  font-weight: 700;
}

.home-themes {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.home-themes__theme {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px 8px 14px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  font-weight: 700;
}

.home-themes__theme--light {
  color: var(--ink);
  background: var(--surface);
}

.home-themes__theme--dark {
  border-color: var(--logo-night);
  color: var(--logo-foam);
  background: var(--logo-night);
}

.home-themes__icon {
  width: 20px;
  height: 20px;
}

/* Get the app */
.home-get {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px 32px;
  margin: 72px 0;
  padding: 36px 40px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--surface);
}

.home-get__logo {
  width: 96px;
  height: 96px;
}

.home-get__text {
  display: grid;
  gap: 8px;
}

.home-get__heading {
  font-size: clamp(1.75rem, 1.6vw + 1rem, 2.4rem);
}

.home-get__lead {
  max-width: 40em;
  color: var(--muted);
  font-size: 1.1rem;
}

.home-get__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

/* Footer */
.site-footer {
  padding: 26px 0 42px;
  border-top: 1px solid var(--line);
}

/* Tablet */
@media (max-width: 1000px) {
  .home-hero {
    grid-template-columns: 1fr;
    gap: 16px;
    padding-bottom: 40px;
  }

  .home-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-card--add {
    grid-column: span 2;
  }

  .home-get {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .home-get__actions {
    grid-column: 2;
    justify-self: start;
  }
}

/* Phone */
@media (max-width: 640px) {
  .home-top,
  .home,
  .site-footer {
    width: min(calc(100% - 28px), 1120px);
  }

  .home-top {
    padding-top: 22px;
  }

  .language-selector {
    right: 14px;
  }

  .home-hero__heading {
    letter-spacing: -.03em;
  }

  .home-hero__lead {
    font-size: 1.08rem;
  }

  .home-hero__actions,
  .home-hero__actions .home-button {
    width: 100%;
  }

  .home-hero__visual {
    min-height: 660px;
  }

  .home-hero__shape {
    width: 600px;
    transform: translate(-50%, -50%);
  }

  .home-grid {
    grid-template-columns: 1fr;
  }

  .home-card--wide,
  .home-card--add {
    grid-column: auto;
  }

  .home-card--row,
  .home-card--split {
    grid-template-columns: 1fr;
  }

  .home-card {
    padding: 24px 20px;
  }

  .home-get {
    grid-template-columns: 1fr;
    justify-items: start;
    margin: 56px 0;
    padding: 28px 22px;
  }

  .home-get__logo {
    width: 72px;
    height: 72px;
  }

  .home-get__actions {
    grid-column: auto;
    width: 100%;
  }

  .home-get__actions .home-button {
    width: 100%;
  }
}
