/* The site's stylesheet: tokens, type, header, buttons, hero layout, doors, footer, 404 and gate.
   The page is a sheet of drawing paper; the three.js pictures fade into the same paper color, so
   there is no frame between a picture and the text around it. The drawings' own rules (canvas,
   notes, mood chips placement) live in drawing.css; per-page rules in css/pages/<key>.css.
   Brand colors come from the Prime Inversiones logo: navy and gold. */

/* ---------- fonts (all self-hosted) */
@font-face {
  font-family: "Fraunces";
  src: url("/assets/fonts/fraunces-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Fraunces";
  src: url("/assets/fonts/fraunces-latin-wght-italic.woff2") format("woff2");
  font-weight: 100 900; font-style: italic; font-display: swap;
}
@font-face {
  font-family: "Atkinson Hyperlegible Next";
  src: url("/assets/fonts/atkinson-hyperlegible-next-latin-wght-normal.woff2") format("woff2");
  font-weight: 200 800; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Atkinson Hyperlegible Next";
  src: url("/assets/fonts/atkinson-hyperlegible-next-latin-wght-italic.woff2") format("woff2");
  font-weight: 200 800; font-style: italic; font-display: swap;
}
@font-face {
  font-family: "Caveat";
  src: url("/assets/fonts/caveat-latin-wght-normal.woff2") format("woff2");
  font-weight: 400 700; font-style: normal; font-display: swap;
}

/* ---------- tokens
   Contrast on --paper (WCAG ratio): --ink 15.8, --ink-soft 7.5, --gold-deep 5.1 (the only gold for
   small text), --coral-deep 4.9, --sea-deep 6.5. Navy text on --gold buttons: 6.4. */
:root {
  --paper: #fbf6ea;
  --paper-deep: #f3ead6;
  --card: #fffdf6;
  --rule: #d8cbb0;

  --ink: #0b1b3a;        /* navy: text and dark buttons */
  --navy-deep: #031334;  /* the logo's own navy: the mark tile and any dark band */
  --ink-soft: #44506a;
  --gold: #c59650;
  --gold-light: #ffd186;
  --gold-deep: #8a6222;

  /* small secondary accents only */
  --sea: #1b8a9e;
  --sea-deep: #0e6274;
  --coral: #e4572e;
  --coral-deep: #bf3f1a;
  --sun: #f5b83d;
  --palm: #3e8e41;
  --palm-deep: #2e6b31;   /* green text or a green fill under paper text: 5.2 on its 12% tint, paper on it 6.0 */

  --font-display: "Fraunces", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --font-body: "Atkinson Hyperlegible Next", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-hand: "Caveat", "Segoe Print", "Bradley Hand", cursive;

  --wide: 77.5rem;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  /* a line drawn by hand is never a perfect rounded rectangle */
  --wobble: 255px 18px 225px 18px / 18px 225px 18px 255px;
}

/* ---------- base */
*, *::before, *::after { box-sizing: border-box; }

html {
  font-size: 112.5%; /* 18px: the text is meant to be read without leaning in */
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* a control reached with Shift+Tab, or an anchor, stops below the sticky header (app.js measures it
     into --header-h; 5rem until then) */
  scroll-padding-top: calc(var(--header-h, 5rem) + 0.5rem);
}
/* hidden means hidden: a class's display (.btn's inline-flex, a list's grid) must never show an element
   a script has hidden (audit 4, D19: the game's "Play again", Wander's empty testimonial list) */
[hidden] { display: none !important; }
/* on a phone the floating chat button covers the bottom of the screen: a link reached with Tab, or
   an anchor jumped to, stops above it */
@media (max-width: 54rem) {
  html { scroll-padding-bottom: 5.5rem; }
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  overflow-x: hidden;
}
/* Long words and addresses break when a line has no other place to, so no text pushes a page
   sideways on a 320 px phone at a 24 px browser default (WCAG 1.4.10, reflow). "anywhere" rather than
   "break-word" because only "anywhere" also lets a grid or flex item holding such text shrink to its
   track. :where() keeps it at zero specificity, so any page rule wins; table cells are left out (a
   wide table scrolls in its wrapper instead of breaking its words), and so is white-space: nowrap. */
:where(p, li, dd, dt, figcaption, blockquote, caption, legend) {
  overflow-wrap: anywhere;
}
/* Headings wrap between whole words, never inside one: neither anywhere ("Dominica/n Republic" read badly
   in the second newcomer test) nor at syllables ("apart-ments", "pe-/nínsula" read badly in the live test of
   2026-11-22). A word wider than its whole line, which no heading has at 390 px with 24 px text
   (test/tooling/overflow.test.js), would still break, as the last resort; a heading that needs it is made
   smaller with clamp() instead */
:where(h1, h2, h3, h4, h5, h6) {
  hyphens: manual;
  overflow-wrap: break-word;
}
/* inline pieces only break, without changing how wide their box may be (a link or button set as a
   flex row with an icon keeps its shape) */
:where(a, button, q, cite, label, summary) {
  overflow-wrap: break-word;
}
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 560;
  line-height: 1.08;
  letter-spacing: -0.012em;
  margin: 0;
  text-wrap: balance;
}
p { margin: 0; }
img { max-width: 100%; height: auto; }
a { color: var(--ink); text-decoration-color: var(--gold); text-underline-offset: 0.18em; }
a:hover { color: var(--gold-deep); }
:focus-visible { outline: 3px solid var(--sea); outline-offset: 3px; border-radius: 4px; }

.icon {
  width: 1.15em; height: 1.15em; flex: none;
  fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
/* out of sight above the page until focused, however many lines larger text gives it (a fixed -4rem let a
   two-line link show its lower edge over the header at 200% text on a phone) */
.skip {
  position: absolute; left: 1rem; top: 0; z-index: 50; transform: translateY(-110%);
  background: var(--ink); color: var(--paper); padding: 0.6rem 1rem; border-radius: 0.5rem;
}
.skip:focus { top: 1rem; transform: none; color: var(--paper); }

/* ---------- header */
.top {
  position: sticky; top: 0; z-index: 20;
  background: var(--paper);
  border-bottom: 1.5px dashed var(--rule);
}
/* a header wrapped onto several rows by much larger text scrolls away with the page (app.js) */
.top.top--tall { position: relative; }
/* The header may use more of a wide screen than the text column: six menu items, the Help "?",
   the language switch and the chat button need it. Measured in both languages with the six labels
   (Home, Investment Opportunities, Samaná, How buying works, Avoid scams, About us and their Spanish
   forms; Ways to buy and DR vs USA are in the footer; a label longer than 6em, 5em in Spanish, wraps onto two balanced lines) and the
   Help control, 2026-11-16, Spanish being the longer, with a real 15 px scrollbar taking its
   width: the full menu shows from 80rem (1,280 px), set closest up to 89rem (1,424 px), a little
   tighter up to 101rem (1,616 px), with growing gaps from there; below 120rem the language switch
   shows its code ("ES", "EN"); the tag line shows from 110rem (1,760 px) in both languages (the header stops
   growing at 110rem, and the shorter switch leaves the longer Spanish tag line room there; until 2026-11-22
   Spanish waited for 120rem). At each step's narrowest width at least 11 px are left between the name and the menu
   (Spanish at 1,280 px; 17 px in English). Below 80rem the menu folds behind the Menu button. */
.top__in {
  max-width: 110rem; margin: 0 auto; padding: 0.7rem var(--gutter);
  display: flex; align-items: center; gap: 1.5rem;
}
.brand { display: flex; align-items: center; gap: 0.7rem; min-width: 0; text-decoration: none; color: var(--ink); margin-right: auto; }
.brand:hover { color: var(--ink); }
.brand__mark {
  display: grid; place-items: center; width: 2.5rem; height: 2.5rem; flex: none; overflow: hidden;
  font-family: var(--font-display); font-weight: 700; font-size: 1.3rem; letter-spacing: -0.03em;
  color: var(--gold-light); background: var(--navy-deep); border-radius: var(--wobble);
}
.brand__logo { width: 100%; height: 100%; object-fit: contain; }
.brand__text { display: grid; line-height: 1.15; min-width: 0; }
.brand__name { font-family: var(--font-display); font-weight: 600; font-size: 1.12rem; }
.brand__tag { font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-soft); }

.nav { display: flex; align-items: center; gap: clamp(0.9rem, 2vw, 1.7rem); }
.nav__link { color: var(--ink); text-decoration: none; font-weight: 500; padding: 0.35rem 0; border-bottom: 2px solid transparent; }
.nav__link:hover, .nav__link.is-current { border-bottom-color: var(--gold); color: var(--ink); }
.nav__link.is-soon { color: var(--ink-soft); }
.nav__link.is-soon:hover { border-bottom-color: transparent; }
.nav__lang {
  font-weight: 600; text-decoration: none; color: var(--ink);
  padding: 0.3rem 0.75rem; border: 1.5px solid currentColor; border-radius: var(--wobble);
}
.nav__lang:hover { color: var(--gold-deep); }
/* the language's short code ("ES", "EN") stands in for its name only where the full menu is set tight
   (80rem to 119.99rem, below): six menu labels with their two-line wraps, and the name stays in the link for
   screen readers and in its title */
.nav__lang-code { display: none; }
/* the way to the Help page beside the language switch: a round "?" on a wide screen; the word
   ("Help" / "Ayuda") stays in the link for screen readers, and the folded menu shows it */
.nav__help {
  display: inline-grid; place-items: center; flex: none; width: 2.1rem; height: 2.1rem;
  color: var(--ink); text-decoration: none; font-weight: 700; line-height: 1;
  border: 1.5px solid currentColor; border-radius: 50%;
}
.nav__help:hover, .nav__help.is-current { color: var(--gold-deep); }
.nav__help-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.top__menu {
  display: none; flex: none; font: inherit; font-weight: 600; color: var(--ink); background: none;
  border: 1.5px solid var(--ink); border-radius: var(--wobble); padding: 0.4rem 0.9rem; cursor: pointer;
}
.top__menu[aria-expanded="true"] { background: var(--ink); color: var(--paper); }
/* the language switch in the top bar, before the Menu button, wherever the menu is folded (below 80rem): the
   full menu's switch as it looks from 1,280 px (its code, "ES" / "EN", in the same hand-drawn outline), a 44 px
   target; its name ("Español" / "English") stays in the link for screen readers. The folded menu then does not
   repeat it (below). From 80rem the full menu has its own. */
.top__end, .top__lang { display: none; }
.top__lang-name { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ---------- new replies (chat/unread.js, 2026-11-22): one small number, calm, in the site's sea colour
   (white on --sea-deep: 7.0:1), never red, never blinking; a gentle entrance once per new number, none
   with reduced motion. On the chat buttons for a visitor; for Wander, a messages icon in the header
   (in the top bar before the language switch and Menu; from 80rem after the menu), shown only while
   there is something new. */
.unread-badge {
  position: absolute; top: -0.5rem; right: -0.5rem; z-index: 1;
  display: inline-grid; place-items: center; box-sizing: border-box;
  min-width: 1.35rem; height: 1.35rem; padding: 0 0.3rem;
  font-family: var(--font-body); font-size: 0.75rem; font-weight: 700; line-height: 1; letter-spacing: 0;
  color: #fff; background: var(--sea-deep); border: 2px solid var(--paper); border-radius: 999px;
  pointer-events: none; white-space: nowrap;
}
.unread-badge--new { animation: unread-in 0.35s ease-out 1; }
@keyframes unread-in {
  from { transform: scale(0.6); opacity: 0; }
  to { transform: none; opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .unread-badge--new { animation: none; }
}
:where(.top__chat, .nav__chat).has-unread { position: relative; }
.top__inbox {
  position: relative; display: inline-flex; align-items: center; justify-content: center; flex: none; align-self: stretch;
  min-width: 44px; min-height: 44px; padding: 0.2rem 0.45rem; box-sizing: border-box;
  color: var(--ink); text-decoration: none; border: 1.5px solid currentColor; border-radius: var(--wobble);
}
.top__inbox:hover { color: var(--sea-deep); }
.top__inbox-icon { width: 1.4rem; height: 1.4rem; stroke-width: 1.8; }
@media (min-width: 80rem) {
  .top__end:has(.top__inbox) { display: flex; order: 1; align-items: center; }
}
.unread-live { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ---------- buttons */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font: inherit; font-weight: 650; line-height: 1.2; text-decoration: none; cursor: pointer;
  padding: 0.85rem 1.35rem; border: 2px solid var(--ink); border-radius: var(--wobble);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
  /* as for paragraphs (above): a word longer than the line ("opportunities" at a 24 px default on a
     320 px phone) breaks as a last resort instead of pushing the page sideways */
  overflow-wrap: anywhere;
}
.btn:hover { transform: translate(-1px, -2px); }
.btn--main { background: var(--ink); color: var(--paper); box-shadow: 3px 4px 0 var(--gold); }
.btn--main:hover { color: var(--paper); box-shadow: 5px 7px 0 var(--gold); }
.btn--chat { background: var(--gold); color: var(--ink); box-shadow: 3px 4px 0 var(--ink); }
.btn--chat:hover { background: var(--gold-light); color: var(--ink); box-shadow: 5px 7px 0 var(--ink); }
.nav__chat { padding: 0.55rem 1rem; box-shadow: 2px 3px 0 var(--ink); }

.chip {
  font: inherit; font-size: 0.86rem; font-weight: 600; color: var(--ink); cursor: pointer;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  border: 1.5px solid var(--ink); border-radius: var(--wobble); padding: 0.3rem 0.85rem;
}
.chip.is-on { background: var(--ink); color: var(--paper); }

/* ---------- hero (the drawing itself is styled in drawing.css) */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 31rem) minmax(0, 1fr);
  align-items: center;
  gap: clamp(0.5rem, 2vw, 2rem);
  padding-left: max(var(--gutter), calc((100vw - var(--wide)) / 2 + var(--gutter)));
  min-height: min(46rem, calc(100vh - 4.6rem));
}
.hero__text { padding-block: clamp(2rem, 6vh, 4rem); position: relative; z-index: 2; }
.kicker {
  font-size: 0.8rem; font-weight: 650; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold-deep);
  margin-bottom: 1.1rem;
}
.hero__title { font-size: clamp(min(2.45rem, 11.5vw), 4.6vw, 4.1rem); }
.hero__title em {
  font-style: italic; font-weight: 480; color: var(--ink);
  /* a pencil underline in gold */
  text-decoration: underline wavy var(--gold); text-decoration-thickness: 0.09em; text-underline-offset: 0.14em;
}
/* what is for sale, counted from the data (src/pages/home.js heroLine), right under the headline */
.hero__line { margin-top: 1.1rem; max-width: 30rem; font-size: 1.12rem; line-height: 1.5; font-weight: 600; color: var(--ink); }
.lead { font-size: 1.18rem; line-height: 1.55; color: var(--ink-soft); margin-top: 1.4rem; max-width: 30rem; }
.hero__line + .lead { margin-top: 0.8rem; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 0.9rem 1rem; margin-top: 2rem; }

/* ---------- three doors */
.doors { max-width: var(--wide); margin: 0 auto; padding: clamp(3rem, 8vw, 5.5rem) var(--gutter); }
.doors__title { font-size: clamp(1.8rem, 3.2vw, 2.6rem); margin-bottom: 1.8rem; }
.doors__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.4rem; }
.door {
  background: var(--card); border: 2px solid var(--ink); border-radius: var(--wobble);
  padding: 1.6rem min(1.5rem, 5vw) 1.7rem; box-shadow: 4px 5px 0 var(--rule);
}
/* the title shrinks with the window, so "Retirarte" fits a 320 px phone at a 24 px browser default */
.door__title { font-size: min(1.45rem, 6.6vw); margin-bottom: 0.6rem; }
.door__text { color: var(--ink-soft); }
.door--investment { box-shadow: 4px 5px 0 var(--gold); }
.door--vacation { box-shadow: 4px 5px 0 var(--sea); }
.door--retirement { box-shadow: 4px 5px 0 var(--coral); }

/* ---------- footer
   A dark band in the logo's navy, so the end of the page reads as the end and not as more content
   (a contrasting background is the usual page boundary; light text keeps WCAG AA contrast, about
   9:1 for the softer lines). Two parts: the site's own lines, then the builder's credit in a strip
   of its own below a hairline, quieter still. */
.foot {
  --foot-text: var(--paper);
  --foot-soft: color-mix(in srgb, var(--paper) 72%, var(--navy-deep));
  --foot-line: color-mix(in srgb, var(--paper) 22%, var(--navy-deep));
  margin-top: 3rem; background: var(--navy-deep); color: var(--foot-text);
  border-top: 4px solid var(--gold);
}
.foot a { color: inherit; text-decoration-color: var(--foot-soft); text-underline-offset: 0.2em; }
.foot a:hover { color: var(--gold-light); text-decoration-color: currentColor; }
.foot :focus-visible { outline: 3px solid var(--gold-light); outline-offset: 2px; }
.foot__in {
  max-width: var(--wide); margin: 0 auto; padding: 2.2rem var(--gutter) 1.6rem;
  display: grid; gap: 0.5rem; font-size: 0.95rem;
}
.foot__proto { font-family: var(--font-hand); font-size: 1.3rem; color: var(--gold-light); }
.foot__rights { font-weight: 600; }
.foot__links { font-size: 0.95rem; color: var(--foot-soft); }
/* the builder's credit: its own strip, smaller and softer, nothing that competes with the site */
.foot__maker { max-width: var(--wide); margin: 0 auto; padding: 0 var(--gutter) 2.4rem; }
/* the hairline spans the text column only, like the lines above it */
.foot__credit { padding-top: 1.1rem; border-top: 1px solid var(--foot-line); font-size: 0.85rem; line-height: 1.6; color: var(--foot-soft); }
.foot__credit .tiger-sig { color: var(--foot-text); font-weight: 600; }
/* the contact button sits on a line of its own, outlined, so it never reads as part of the "How this
   site was made" link before it (audit 4, part 3: 4 px apart, both underlined, they read as one) */
.foot__contact {
  display: flex; align-items: center; width: fit-content; min-height: 2.75rem; margin-top: 0.7rem; padding: 0.2rem 1rem;
  font: inherit; font-weight: 600; color: var(--foot-text); background: none; cursor: pointer; text-decoration: none;
  border: 1.5px solid var(--gold); border-radius: var(--wobble);
}
.foot__credit a.foot__contact { text-decoration: none; }
.foot__contact:hover { color: var(--navy-deep); background: var(--gold-light); border-color: var(--gold-light); }
/* on a phone every footer link is a 44 px target (WCAG 2.5.5) */
@media (max-width: 54rem) {
  .foot__links a, .foot__credit a:not(.foot__contact) { display: inline-flex; align-items: center; min-height: 2.75rem; }
}
/* on paper the band would be ink saved for nothing: plain dark text, a rule above */
@media print {
  .foot { background: none; color: var(--ink); border-top: 1.5px solid var(--ink); }
  .foot__maker { border-top-color: var(--rule); }
  .foot__links, .foot__credit, .foot__proto { color: var(--ink); }
}

/* only for a browser without JavaScript (nojs.css shows them and hides what needs a script) */
.contact-fallback, .nojs-only { display: none; }

/* ---------- 404: a boat that drifted off the map */
.lost { max-width: var(--wide); margin: 0 auto; padding: clamp(2rem, 6vw, 4rem) var(--gutter) 2rem; }
.lost__art {
  display: block; width: min(15rem, 70%); height: auto; margin-bottom: 1.5rem;
  fill: none; stroke: var(--ink); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round;
}
.lost__sea { stroke: var(--sea); }
.lost__sea--2 { stroke: var(--sea-deep); opacity: 0.6; }
.lost__hull { fill: var(--gold); }
.lost__sail { fill: var(--card); }
.lost__mark { stroke: var(--gold-deep); stroke-width: 3; }
.lost__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem 3rem; }
.lost__lang { display: grid; gap: 1rem; align-content: start; }
.lost__title { font-size: clamp(1.8rem, 3.6vw, 2.8rem); }
.lost__lang + .lost__lang { border-left: 1.5px dashed var(--rule); padding-left: 3rem; }

/* ---------- the bare address */
.gate { min-height: 100vh; display: grid; place-content: center; gap: 1rem; text-align: center; font-family: var(--font-display); font-size: 1.6rem; }
.gate__name { font-size: 2.2rem; }

/* ---------- motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
  .btn:hover { transform: none; }
}

/* ---------- smaller screens */
@media (max-width: 62rem) {
  /* not 1fr: a 1fr column grows to the headline's longest word, and at a 24 px browser default the
     Spanish home page was 407 px wide on a 390 px phone; minmax(0, 1fr) keeps it to the screen */
  .hero { grid-template-columns: minmax(0, 1fr); padding-left: 0; min-height: 0; gap: 0; }
  .hero__title { overflow-wrap: break-word; hyphens: manual; }
  .hero__text { padding: 2.2rem var(--gutter) 0.5rem; }
  .doors__grid { grid-template-columns: 1fr; }
}
/* the full menu: the brand, its tag, every menu label, the switch and the chat button each stay on one line
   (the short labels of 2026-11-18 fit from 1,280 px in both languages). Each label is a target at least 24 px
   tall (WCAG 2.5.8), no taller than the 2.5rem logo tile, so the header keeps its height (3.9rem): the inbox band
   and every scroll margin below rely on it. If the text is made larger than the widths here were measured for
   (a browser that enlarges text without changing the page's width rules, or 200% text), the header wraps onto
   a second row instead of running off the screen: the chat button stays in view and nothing scrolls sideways */
@media (min-width: 80rem) {
  .top__in { flex-wrap: wrap; row-gap: 0.4rem; }
  .brand { flex: none; }
  .brand__name, .brand__tag, .nav__lang, .nav__chat, .nav__link { white-space: nowrap; }
  .nav { flex-wrap: wrap; justify-content: flex-end; row-gap: 0.4rem; margin-left: auto; }
  .nav__link { line-height: 1.2; padding-block: 0.25rem; overflow-wrap: normal; }
}
/* from 1,280 to 1,615 px the menu is set a little tighter so that everything fits beside the name */
@media (min-width: 80rem) and (max-width: 100.99rem) {
  .nav { gap: 0.8rem; }
  .nav__link, .nav__lang, .nav__chat { font-size: 0.9rem; }
  .nav__lang { padding: 0.25rem 0.6rem; }
  .nav__chat { padding: 0.5rem 0.8rem; }
  .nav__help { width: 1.9rem; height: 1.9rem; }
}
/* from 1,280 to 1,423 px, closest: smaller gaps and type, so the Spanish menu, the "?", the switch
   and "Chatea con Wander" still fit beside the name with a 15 px scrollbar */
@media (min-width: 80rem) and (max-width: 88.99rem) {
  .top__in { gap: 1rem; }
  .brand { gap: 0.55rem; }
  .nav { gap: 0.8rem; } /* 14 px: at 9 px the items read as one phrase (audit 5) */
  .nav__link, .nav__lang, .nav__chat { font-size: 0.8rem; }
  .nav__lang { padding: 0.2rem 0.5rem; }
  .nav__chat { padding: 0.45rem 0.55rem; }
  .nav__help { width: 1.75rem; height: 1.75rem; }
}
@media (min-width: 80rem) and (max-width: 109.99rem) {
  .brand__tag { display: none; }
}
@media (min-width: 80rem) and (max-width: 119.99rem) {
  .nav__lang-code { display: inline; }
  .nav__lang-name { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
}
/* from 1,616 px the gaps between the six labels grow with the window, up to their full size */
@media (min-width: 101rem) {
  .nav { gap: clamp(1.1rem, 1.35vw, 1.7rem); }
}
/* the name a little smaller where the six labels are set tight (1,280 to 1,615 px) */
@media (min-width: 80rem) and (max-width: 100.99rem) {
  .brand__name { font-size: 1.04rem; }
}
/* below 80rem the menu folds behind the Menu button (app.js toggles .is-open). The bar is one row; when the name
   and the controls beside it cannot share one (much larger text), the controls move to a second row on the right,
   and the name keeps whole words: the brand is never narrower than its longest word with the logo tile
   (min-content), and no wider than its words on one line (so the home link does not stretch across the bar) */
@media (max-width: 79.99rem) {
  .top__in { gap: 0.5rem 1rem; flex-wrap: wrap; justify-content: flex-end; }
  .brand { flex: 1 1 0; min-width: min-content; max-width: max-content; }
  /* the switch and Menu side by side, as tall as each other, each at least 44 x 44 px; at 320 px with 200% text
     they still share a row (8 px apart), and should even that not fit, the switch stands above Menu */
  .top__end { display: flex; flex: none; flex-wrap: wrap; justify-content: flex-end; align-items: stretch; gap: 8px; max-width: 100%; }
  .top__menu { display: block; align-self: stretch; min-height: 44px; line-height: 1.2; }
  .top__lang {
    position: relative; display: inline-flex; align-items: center; justify-content: center; flex: none; align-self: stretch;
    min-width: 44px; min-height: 44px; padding: 0.2rem 0.45rem;
    font-weight: 600; line-height: 1.2; text-decoration: none; color: var(--ink);
    border: 1.5px solid currentColor; border-radius: var(--wobble);
  }
  .top__lang:hover { color: var(--gold-deep); }
  .nav .nav__lang { display: none; }
  .nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0; padding: 0.5rem var(--gutter) 1.2rem;
    background: var(--paper); border-bottom: 1.5px dashed var(--rule);
    max-height: calc(100vh - 4rem); overflow-y: auto; overscroll-behavior: contain; /* app.js fits it under the header */
  }
  .nav.is-open { display: flex; }
  .nav__link { padding: 0.8rem 0; border-bottom: 1px dashed var(--rule); font-size: 1.1rem; }
  .nav__chat { justify-content: center; margin-top: 1rem; }
  /* folded, Help is a menu item like the others, its "?" in a small circle before the word */
  .nav__help {
    display: flex; align-items: center; gap: 0.6rem; width: auto; height: auto; padding: 0.8rem 0;
    font-size: 1.1rem; font-weight: 500; line-height: inherit; border: 0; border-bottom: 1px dashed var(--rule); border-radius: 0;
  }
  .nav__help-mark {
    display: inline-grid; place-items: center; width: 1.6rem; height: 1.6rem; flex: none;
    font-size: 0.9rem; font-weight: 700; border: 1.5px solid currentColor; border-radius: 50%;
  }
  .nav__help-text { position: static; width: auto; height: auto; overflow: visible; clip-path: none; }
}
/* on a laptop or tablet the folded menu opens as a card on the right, not across the whole width */
@media (min-width: 54.01rem) and (max-width: 79.99rem) {
  .nav {
    left: auto; right: var(--gutter); width: min(24rem, calc(100vw - 2 * var(--gutter)));
    border: 2px solid var(--ink); border-top: 0; border-radius: 0 0 14px 6px; box-shadow: 4px 5px 0 var(--rule);
  }
}
/* phone width */
@media (max-width: 54rem) {
  .brand__tag { display: none; }
  /* the name shrinks with the window; with larger text it takes two lines, word by word, and the language switch
     and the Menu button move under it (above) rather than letters breaking one per line (they did at 200% text) */
  .top__in { column-gap: 0.5rem; }
  .brand { gap: 0.5rem; }
  .brand__mark { width: min(2.5rem, 11vw); height: min(2.5rem, 11vw); font-size: min(1.3rem, 5.6vw); }
  .brand__name { font-size: clamp(0.8rem, 4.2vw, 1.12rem); overflow-wrap: break-word; }
  .top__menu { padding: 0.4rem 0.55rem; }
  /* the open menu covers the page down to the screen's bottom (app.js sets its max-height to what is left under
     the header), and the floating chat button waits behind it: the menu has its own "Chat with Wander" */
  .nav.is-open { height: 100dvh; }
  .menu-open .chat-fab { display: none; }
  .lost__grid { grid-template-columns: 1fr; }
  .lost__lang + .lost__lang { border-left: 0; padding-left: 0; border-top: 1.5px dashed var(--rule); padding-top: 2rem; }
}

/* ---------- touch areas: on a touch screen, links and fold titles that stand on their own line and are drawn
   smaller than 44 px tall (found by the phone survey of 2026-11-21: "Back to the list" 23 px, "Open in Google Maps"
   29 px, the doors' titles 32 px, Help's group titles 30 px, ...) get an invisible layer centred on them, never
   smaller than the control itself, as the drawings' Day / Sunset buttons and the map pins have: the look and the
   layout stay as they are. A link inside a sentence is left alone. */
@media (pointer: coarse) {
  :is(.glance__more, .scams-case__back, .scams-us__offers, .compare-back, .compare-short__more a, .how-step__back,
      .opp__maplink, .door__title a, .home-who__check a, .home-why__all a, .help-group__summary, .privacy-tech__summary) {
    position: relative;
  }
  :is(.glance__more, .scams-case__back, .scams-us__offers, .compare-back, .compare-short__more a, .how-step__back,
      .opp__maplink, .door__title a, .home-who__check a, .home-why__all a, .help-group__summary, .privacy-tech__summary)::after {
    content: ""; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
    width: max(100%, 44px); height: max(100%, 44px);
  }
}
/* the home link in the top bar is a 44 px target too (the logo tile is 35 px on a 320 px phone) */
@media (max-width: 79.99rem) {
  .brand { min-height: 44px; }
}

/* ---------- WhatsApp beside "Chat with Wander" (src/layout.js): on a wide header a round mark like the
   Help "?", its word kept for screen readers and as the tooltip; in the folded menu and the footer the
   mark and the word */
.wa-mark { width: 1.15rem; height: 1.15rem; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linejoin: round; }
.wa-mark path + path { fill: currentColor; stroke: none; }
.nav__wa {
  display: inline-grid; place-items: center; flex: none; width: 2.45rem; height: 2.45rem;
  color: var(--palm); text-decoration: none; border: 1.5px solid currentColor; border-radius: 50%;
}
.nav__wa:hover { color: var(--ink); }
.nav__wa .wa-word { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

@media (max-width: 79.99rem) {
  .nav__wa {
    display: flex; align-items: center; justify-content: center; gap: 0.5rem; width: auto; height: auto; margin-top: 0.7rem;
    padding: 0.7rem 1rem; font-weight: 650; color: var(--ink); border: 2px solid var(--ink); border-radius: var(--wobble);
  }
  .nav__wa .wa-word { position: static; width: auto; height: auto; overflow: visible; clip-path: none; }
  .nav__wa .wa-mark { color: var(--palm); }
}
/* the mark sits left of the word, out of the text's flow, so the word keeps the line's baseline */
.foot__wa { position: relative; padding-left: 1.5rem; }
.foot__wa .wa-mark { position: absolute; left: 0; top: 50%; transform: translateY(-50%); }

/* the WhatsApp card, on a computer (src/layout.js whatsappCard, site/assets/js/app.js) */
/* never taller than the window: the body scrolls inside it, and "Copy the number" and "Close" stay below it in view
   (they were cut off at 1,366 x 768) */
.wa-card { width: min(24rem, calc(100vw - 2rem)); max-height: calc(100dvh - 2rem); padding: 0; overflow: hidden; color: var(--ink); background: var(--paper); border: 2px solid var(--ink); border-radius: var(--wobble); }
.wa-card[open] { display: flex; flex-direction: column; }
.wa-card__body { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 1.5rem 1.5rem 0.4rem; }
.wa-card__foot { flex: none; padding: 0.8rem 1.5rem 1.3rem; border-top: 1.5px dashed var(--rule); }
.wa-card::backdrop { background: rgb(0 0 0 / 0.45); }
/* the mark beside the title's first line, also when the title takes two */
.wa-card__title { display: flex; align-items: flex-start; gap: 0.5rem; margin: 0 0 0.5rem; font-size: 1.35rem; }
.wa-card__title .wa-mark { width: 1.5rem; height: 1.5rem; margin-top: calc((1.08em - 1.5rem) / 2); color: var(--palm); }
.wa-card__lead { margin: 0; }
.wa-card__how { margin: 0.6rem 0 0; font-weight: 600; }
.wa-card__langs { margin: 0.6rem 0 0; font-size: 0.95rem; color: var(--ink-soft); }
.wa-card__phone { margin: 0 0 0.6rem; font-size: 0.9rem; color: var(--ink-soft); }
.wa-card__number { margin: 0.6rem 0 1.1rem; font-size: 1.6rem; font-weight: 700; letter-spacing: 0.01em; font-variant-numeric: tabular-nums; }
/* the plain link for WhatsApp on the computer, right under the number */
.wa-card__computer { margin: -0.6rem 0 1.1rem; font-weight: 600; }
.wa-card__computer a { display: inline-flex; align-items: center; min-height: 2.75rem; }
.wa-card__actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin: 0; }
.wa-card__message { margin: 0 0 1.1rem; padding: 0.8rem 0.9rem; background: var(--card); border: 1.5px dashed var(--rule); border-radius: 8px 4px 10px 5px; }
.wa-card__message[hidden] { display: none; }
.wa-card__message-lead { margin: 0; font-size: 0.9rem; font-weight: 650; color: var(--ink-soft); }
.wa-card__message-text { margin: 0.3rem 0 0.8rem; font-weight: 600; }

/* ---------- a laptop or tablet (768 to 1,279 px): the menu is folded, but "Chat with Wander" and the
   WhatsApp mark stay beside the Menu button (src/layout.js, .top__quick); the folded menu then does not
   repeat them. On a phone they stay inside the menu, as before; from 1,280 px the full menu has its own */
.top__quick { display: none; }
.top__wa {
  display: inline-grid; place-items: center; flex: none; width: 2.1rem; height: 2.1rem;
  color: var(--palm); text-decoration: none; border: 1.5px solid currentColor; border-radius: 50%;
}
.top__wa:hover { color: var(--ink); }
.top__wa .wa-word { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
@media (min-width: 48rem) and (max-width: 79.99rem) {
  .top__quick { display: flex; align-items: center; gap: 0.7rem; flex: none; }
  .top__chat { padding: 0.55rem 1rem; box-shadow: 2px 3px 0 var(--ink); white-space: nowrap; }
  .nav .nav__chat, .nav .nav__wa { display: none; }
}
