/* The home page's own parts (src/pages/home.js). The hero and the doors keep their shared styles
   (site.css); this file adds the map of where Wander's projects are, "Why the Samaná peninsula?",
   and "Who you will talk to". Tokens only, no typed colours. The map's picture itself
   (its size, its stills and its drawn names) is styled with the other drawings, in drawing.css. */

/* ---------- the hero on phones and tablets: the drawing first, so the first screen has its picture
   (once, not a still band of the same scene above the title as before), a little less tall */
@media (max-width: 62rem) {
  .hero > .drawing[data-scene="home"] { order: -1; height: min(100vw, 30rem); }
}
/* on a phone: the drawing's finished still at once, at about half the height, so the headline, the line of
   what is for sale and the button are on the first screen (390 x 844). app.js does not start the live drawing
   at this width. The still is the phone's own 800 x 400 crop (tools/export_drawings.js, home-day-phone.webp),
   not the 1,600 x 1,600 picture the wide hero uses */
@media (max-width: 40rem) {
  .page--home .hero > .drawing[data-scene="home"] { height: min(50vw, 15rem); --still: url("/assets/img/drawings/home-day-phone.webp"); }
  .page--home .hero > .drawing[data-scene="home"]::before { opacity: 1; transition: none; background-position: center; }
  .page--home .hero > .drawing[data-scene="home"] :is(.drawing__canvas, .drawing__notes, .drawing__moods, .drawing__fallback) { display: none; }
  .page--home .hero__text { padding-top: 1.1rem; }
  /* the eyebrow repeats the brand in the header and the three places the lead names: not on a phone */
  .page--home .hero .kicker { display: none; }
  .page--home .hero__title { font-size: min(1.95rem, 9.2vw); }
  .page--home .hero__line { margin-top: 0.6rem; font-size: 1rem; line-height: 1.45; }
  .page--home .lead { margin-top: 0.6rem; font-size: 1rem; line-height: 1.5; }
  .page--home .hero__cta { margin-top: 1rem; gap: 0.7rem; }
  .page--home .hero__cta .btn { padding-block: 0.75rem; }
}

/* ---------- the map: where Wander's projects are */
.home-map__lead { font-size: 1.18rem; color: var(--ink-soft); max-width: 44rem; }
.home-map__figure { margin: 1.2rem 0 0; }
.home-map__figure .drawing { border-radius: 1.2rem 0.4rem 1.4rem 0.5rem; }
.home-map__caption { margin-top: 0.8rem; }
/* on a phone the map runs to the window's edges, so the peninsula is drawn as large as it can be */
@media (max-width: 40rem) {
  .home-map__figure .drawing { margin-inline: calc(-1 * var(--gutter)); border-radius: 0; }
}
.home-map__keys { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.45rem; max-width: 52rem; }
.home-map__key { position: relative; padding-left: 1.7rem; }
/* the key's mark: a gold pin for the places, a dashed box for the airports and the dotted roads */
.home-map__key::before {
  content: ""; position: absolute; left: 0.2rem; top: 0.35em; width: 0.85rem; height: 0.85rem;
  border: 2px solid var(--ink); border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: var(--gold);
}
.home-map__key--plane::before { border-radius: 0.2rem; transform: none; background: var(--card); border-style: dashed; }
.home-map__credit { margin-top: 0.5rem; font-size: 0.82rem; color: var(--ink-soft); max-width: 60rem; }

/* ---------- Why the Samaná peninsula? Its good reasons, one list (the drawbacks are on DR vs USA) */
.home-why__list {
  margin: 0; padding: 1.4rem 1.4rem 1.4rem 2.6rem; display: grid; gap: 0.8rem; max-width: 46rem;
  background: var(--card); border: 2px solid var(--ink); border-radius: 7px 4px 8px 5px; box-shadow: 4px 5px 0 var(--gold);
}
.home-why__list li::marker { color: var(--gold-deep); }
.home-why__all { margin-top: 1.6rem; font-weight: 650; }

/* ---------- Who you will talk to */
.home-who__in { display: grid; grid-template-columns: 13rem minmax(0, 1fr); gap: 1.6rem 2.4rem; align-items: start; }
.home-who__photo { margin: 0; padding: 0.45rem; background: var(--card); border: 2px solid var(--ink); border-radius: 6px 3px 7px 4px; box-shadow: 4px 5px 0 var(--rule); }
.home-who__photo img { display: block; width: 100%; height: auto; border-radius: 2px; }
.home-who__name { font-family: var(--font-display); font-size: 1.4rem; margin-bottom: 1rem; }
.home-who__say { max-width: 44rem; }
.home-who__check { margin-top: 1.2rem; font-weight: 650; }

/* ---------- the "Retire here" door's links to DR vs USA */
.door__also { margin-top: 0.6rem; font-size: 0.95rem; }

@media (max-width: 48rem) {
  .home-who__in { grid-template-columns: minmax(0, 1fr); }
  .home-who__photo { max-width: 10rem; }
}


/* the beach photo Wander sent, in "Why the Samaná peninsula?" */
.home-why__photo {
  max-width: 26rem; margin: 1.2rem 0 0.4rem; padding: 0.45rem 0.45rem 0.6rem;
  background: var(--card); border: 2px solid var(--ink); border-radius: 6px 3px 7px 4px; box-shadow: 4px 5px 0 var(--rule);
}
.home-why__photo img { display: block; width: 100%; height: auto; border-radius: 2px; }
.home-why__caption { margin-top: 0.5rem; font-size: 0.95rem; color: var(--ink-soft); }
.home-why__body .home-why__list { margin-top: 1.4rem; }
/* on wide screens the photo stands beside the list */
@media (min-width: 62rem) {
  .home-why__body { display: grid; grid-template-columns: 17rem minmax(0, 1fr); gap: 2rem; align-items: start; margin-top: 1.4rem; }
  .home-why__body .home-why__photo { margin: 0.6rem 0 0; }
  .home-why__body .home-why__list { margin-top: 0.6rem; }
}
.home-who__role { margin: -0.6rem 0 1rem; color: var(--ink-soft); max-width: 40rem; }

/* ---------- "Why the Samaná peninsula?" since 2026-11-16: six highlight tiles (styled with the shared
   .glance in parts.css), then the beach photo beside the two reasons the tiles do not carry */
.home-why .glance { margin-bottom: 2rem; }
.home-why__also-title { font-weight: 650; margin-bottom: 0.2rem; }
.home-why__all .btn { margin-top: 0.4rem; }
.home-why__all--small { margin-top: 0.8rem; font-size: 0.98rem; }
/* six tiles: three in a row on a wide screen, so they read as two even rows */
@media (min-width: 62rem) { .glance--home { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* ---------- the investment opportunities, right under the hero: one card each (picture, kind and town,
   name, the price it starts from), each opening its offer's page */
.home-offers { padding-top: clamp(1.6rem, 4vw, 2.6rem); }
.home-offers__lead { font-size: 1.12rem; color: var(--ink-soft); max-width: 44rem; }
.home-offers__list { list-style: none; margin: 1.3rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); gap: 1.2rem; }
.home-offer { min-width: 0; }
.home-offer__link {
  display: flex; flex-direction: column; height: 100%; color: inherit; text-decoration: none;
  background: var(--card); border: 2px solid var(--ink); border-radius: var(--wobble); box-shadow: 4px 5px 0 var(--gold); overflow: hidden;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
/* each card in its type's colour, as on the Investment Opportunities list (land gold, apartments sea, houses coral) */
.home-offer--gold { --stall: var(--gold); }
.home-offer--sea { --stall: var(--sea); }
.home-offer--coral { --stall: var(--coral); }
.home-offer .home-offer__link { box-shadow: 4px 5px 0 var(--stall, var(--gold)); }
.home-offer__link:hover { transform: translateY(-2px); }
.home-offer__link:focus-visible { outline: 3px solid var(--sea); outline-offset: 3px; }
.home-offer__pic { position: relative; display: block; aspect-ratio: 3 / 2; background: var(--paper-deep); border-bottom: 2px solid var(--ink); }
.home-offer__pic img { display: block; width: 100%; height: 100%; object-fit: cover; }
.home-offer__badge { position: absolute; top: 0.6rem; left: 0.6rem; }
.home-offer__body { display: grid; gap: 0.25rem; padding: 0.9rem 1.1rem 1.1rem; }
.home-offer__kind { min-height: calc(2 * 1.45em); line-height: 1.45; font-size: 0.8rem; font-weight: 650; letter-spacing: 0.08em; text-transform: uppercase; color: var(--gold-deep); }
.home-offer__name { font-family: var(--font-display); font-size: 1.35rem; line-height: 1.2; }
.home-offer__price { font-weight: 700; font-size: 1.12rem; }
.home-offers__all { margin-top: 1.5rem; }
@media (prefers-reduced-motion: reduce) { .home-offer__link { transition: none; } .home-offer__link:hover { transform: none; } }

/* ---------- the hero on wide screens: the words keep their own column (the drawing no longer slides
   under them), and the headline also scales with the window's height, so the eyebrow, the lead and both
   buttons fit beside the drawing and above the fold at 1280 x 720 and 1440 x 900 in both languages */
@media (min-width: 62.01rem) {
  .page--home .hero > .drawing[data-scene="home"] { margin-left: 0; }
  .page--home .hero__text { padding-block: clamp(1.2rem, 4vh, 3rem); }
  /* the headline of 2026-11-18 says what is for sale and is longer ("Terrenos y apartamentos en venta en la
     península de Samaná"): a little smaller, so the line under it and both buttons fit too */
  .page--home .hero__title { font-size: clamp(2rem, min(3.6vw, 6vh), 3.3rem); }
  .page--home .hero__line { margin-top: 1rem; font-size: 1.05rem; }
  .page--home .kicker { margin-bottom: 0.8rem; }
  .page--home .lead { font-size: 1.05rem; margin-top: 0.7rem; }
  .page--home .hero__cta { margin-top: 1.4rem; }
}
/* on a phone each card is one row, the picture on the left, so the three fit about one screen */
@media (max-width: 40rem) {
  .home-offers__list { gap: 0.9rem; }
  .home-offer__link { flex-direction: row; }
  .home-offer__pic { flex: none; width: 38%; aspect-ratio: auto; min-height: 7.5rem; border-bottom: 0; border-right: 2px solid var(--ink); }
  /* the pill on one line, inside the picture's corner */
  .home-offer__badge { top: auto; bottom: 0.3rem; left: 0.3rem; max-width: calc(100% - 0.6rem); font-size: 0.62rem; line-height: 1.2; white-space: nowrap; padding: 0.08rem 0.35rem; }
  .home-offer__body { align-content: center; padding: 0.7rem 0.8rem; }
  .home-offer__kind { min-height: 0; font-size: 0.72rem; letter-spacing: 0.05em; }
  .home-offer__name { font-size: 1.12rem; }
  .home-offer__price { font-size: 0.95rem; }
  .home-offer__price .from-sub { font-size: 0.8rem; }
}

/* the line to How buying works, "Buying from the US" (2026-11-17) */
.page--home .hero__us { margin-top: 0.9rem; font-weight: 600; }
.home-offers__note { margin-top: 0.9rem; font-size: 0.92rem; color: var(--ink-soft); max-width: 46rem; }
