/* bNear landing — design_handoff_bnear/"bNear Landing v3".
   The prototype carried its styling inline; here it is a stylesheet reading
   from tokens.css, so the landing, the admin console and the dev console all
   move together when a token changes. */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
/* Belt and braces. The causes above are fixed, but a single overflowing
   element makes the whole page pan sideways on a phone, and that reads as
   broken — so it is stopped here as well. */
html { -webkit-text-size-adjust: 100%; overflow-x: hidden; }
/* An author `display` beats the UA stylesheet's `[hidden] { display: none }`,
   and the button rules here set `display: inline-flex` — so a button with the
   hidden attribute rendered anyway. That was showing "Activar notificações"
   on iOS Safari, where the code explicitly hides it. */
[hidden] { display: none !important; }
body { overflow-x: hidden; }

body {
  font-family: var(--bn-font);
  font-weight: 300;
  color: var(--bn-ink);
  background: var(--bn-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--color-accent-700); text-decoration: none; }
a:hover { color: var(--color-accent); }
:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 3px; border-radius: var(--r-pill); }

.shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.wrap { max-width: 1440px; margin: 0 auto; width: 100%; padding-left: var(--s-8); padding-right: var(--s-8); }

@keyframes bnRise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes bnFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}

/* ── Nav ────────────────────────────────────────────────────── */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-7);
  padding-top: var(--s-5);
  padding-bottom: var(--s-5);
}
/* min-width:0 on both sides: a flex item defaults to min-width:auto and
   refuses to shrink below its content, which is how a nav overflows its
   own container. */
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; color: var(--bn-ink); }
.brand:hover { color: var(--bn-ink); }
.brand img { width: 30px; height: 30px; display: block; }
/* Wordmark rule: b in 400, Near in 700, Nunito. Never all-bold. */
.wordmark { font-family: var(--bn-wordmark); font-size: 20px; font-weight: 400; line-height: 1; }
.wordmark b { font-weight: 700; }

.nav-right { display: flex; align-items: center; gap: 10px; min-width: 0; }

.bmc { display: inline-flex; align-items: center; height: 22px; transition: transform .2s ease, opacity .2s ease; }
.bmc:hover { transform: translateY(-2px); opacity: .85; }
/* Both dimensions are stated. Left to `width: auto`, an SVG whose file has no
   width/height attributes takes the default replaced size — Safari does not
   derive it from the viewBox, and renders the cup ~300px wide, which pushes
   the caregiver pill off the right edge and lets the page scroll sideways. */
.bmc img { display: block; }
.bmc .wordmark-img { width: 98px; height: 20px; }
.bmc .cup { display: none; width: 15px; height: 22px; }

/* Wide screens: the menu is the segmented control itself, laid out inline.
   Narrow ones reuse the same buttons as a dropdown — see the media query. */
.lang-picker { position: relative; display: flex; align-items: center; }
.lang-trigger { display: none; }

.lang-menu {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border-radius: var(--r-pill);
  border: 1px solid var(--bn-line);
  background: var(--bn-card);
}
.lang-menu button {
  padding: 6px 12px;
  border: 0;
  border-radius: var(--r-pill);
  background: transparent;
  color: var(--bn-muted);
  font-family: inherit;
  font-size: var(--fs-cap);
  font-weight: 500;
  letter-spacing: 0.04em;
  white-space: nowrap;
  cursor: pointer;
  transition: background .2s ease, color .2s ease;
}
.lang-menu button[aria-pressed="true"] { background: var(--color-accent); color: #fff; }

.pill-accent {
  display: inline-flex;
  align-items: center;
  padding: 11px 22px;
  border-radius: var(--r-pill);
  background: var(--color-accent);
  color: #fff;
  font-size: var(--fs-body-sm);
  font-weight: 500;
  white-space: nowrap;
  box-shadow: var(--shadow-teal);
  transition: transform .2s ease, box-shadow .2s ease;
}
.pill-accent:hover { transform: translateY(-2px); box-shadow: var(--shadow-teal-hi); color: #fff; }

/* ── Hero ───────────────────────────────────────────────────── */
.hero {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(48px, 6vw, 110px);
  padding-top: var(--s-2);
  padding-bottom: 40px;
}
.hero-copy { max-width: 660px; justify-self: start; animation: bnRise .8s var(--ease-lift) both; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 7px 14px 7px 9px;
  border-radius: var(--r-pill);
  background: var(--color-accent-100);
  color: var(--color-accent-800);
  font-size: var(--fs-meta);
  margin-bottom: 26px;
}
.chip .dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--color-accent);
  display: block;
  animation: bnFloat 2.4s ease-in-out infinite;
}

.hero h1 {
  font-size: clamp(40px, 5.4vw, 78px);
  font-weight: 200;
  line-height: 1.02;
  letter-spacing: -0.032em;
  margin-bottom: 22px;
  text-wrap: balance;
  /* Last resort. "verdadeiramente" is 15 characters with nowhere to break;
     better a broken word than a page that scrolls sideways. */
  overflow-wrap: break-word;
}
.hero h1 em { font-style: normal; font-weight: 500; color: var(--color-accent); }

.lede {
  font-size: var(--fs-lede);
  line-height: 1.62;
  color: var(--bn-muted);
  max-width: 47ch;
  margin-bottom: 34px;
  text-wrap: pretty;
}
.lede .wordmark { font-size: inherit; color: var(--bn-ink); }

.join { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.join input {
  min-width: 250px;
  padding: 15px 20px;
  border-radius: var(--r-pill);
  border: 1px solid var(--bn-line);
  background: var(--bn-card);
  color: var(--bn-ink);
  font-family: inherit;
  font-size: var(--fs-body);
  font-weight: 300;
  box-shadow: 0 2px 10px rgba(22, 33, 31, 0.04);
}
.join input::placeholder { color: var(--text-faint); }
.join input:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 4px var(--color-accent-100);
}
.pill-ink {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  padding: 15px 28px;
  border-radius: var(--r-pill);
  border: 0;
  background: var(--bn-ink);
  color: #fff;
  font-family: inherit;
  font-size: var(--fs-body);
  font-weight: 500;
  cursor: pointer;
  transition: transform .2s ease, background .2s ease;
}
.pill-ink:hover { background: var(--color-accent); transform: translateY(-2px); color: #fff; }

.meta {
  display: flex;
  gap: 26px;
  flex-wrap: wrap;
  margin-top: 34px;
  font-size: var(--fs-body-sm);
  color: var(--bn-muted);
}

/* ── Orb ────────────────────────────────────────────────────── */
.orb-slot { position: relative; height: min(76vh, 640px); min-height: 460px; }
.orb-glow {
  position: absolute;
  inset: 6% 8%;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 45%, rgba(15, 158, 140, 0.10), rgba(15, 158, 140, 0) 68%);
}
/* Shown until the 3D mark takes over, and left in place for good if three.js
   never arrives — the hero must never be half empty. */
.orb-still {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
}
.orb-still img { width: min(62%, 340px); height: auto; animation: bnFloat 6s ease-in-out infinite; }
.orb-slot[data-live="true"] .orb-still { display: none; }
/* touch-action:none hands the browser's scroll gesture to us, so a finger
   dragged across the mark turns it instead of moving the page. Scoped to the
   custom element, not .orb-slot: if three.js never arrives the element is
   never created, and the still mark keeps scrolling normally. */
bnear-orb { position: absolute; inset: 0; display: block; touch-action: none; }

/* ── Cards ──────────────────────────────────────────────────── */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-4); padding-bottom: 40px; }
.card {
  background: var(--bn-card);
  border: 1px solid var(--bn-line);
  border-radius: var(--r-card-lg);
  padding: 26px 28px;
  transition: transform .25s var(--ease-lift), box-shadow .25s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-card); }
.card h2 { font-size: var(--fs-body); font-weight: 500; margin-bottom: 10px; }
.card p { font-size: var(--fs-body-sm); line-height: 1.65; color: var(--bn-muted); }
.scale-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 10px; }
.scale-head span:first-child { font-size: var(--fs-body); font-weight: 500; }
.scale-bar {
  height: 6px;
  flex: 1;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--t-365), var(--t-370), var(--t-380), var(--t-400));
}
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.tags span {
  padding: 4px 11px;
  border-radius: var(--r-pill);
  background: var(--color-accent-100);
  color: var(--color-accent-800);
  font-size: var(--fs-cap);
}

/* ── Footer ─────────────────────────────────────────────────── */
.foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-5);
  flex-wrap: wrap;
  padding-top: 20px;
  padding-bottom: 28px;
  border-top: 1px solid var(--bn-line);
  font-size: var(--fs-meta);
  color: var(--bn-muted);
}
.foot-links { display: flex; gap: 20px; }
.foot a { color: var(--bn-muted); }
.foot a:hover { color: var(--color-accent); }

/* ── Narrow ─────────────────────────────────────────────────── */
@media (max-width: 980px) {
  .wrap { padding-left: var(--s-5); padding-right: var(--s-5); }
  .hero { grid-template-columns: 1fr; gap: var(--s-5); padding-bottom: var(--s-7); }
  /* Sits under the copy once the hero stacks, at a height that leaves the
     headline leading and brings the orb in with a short scroll. */
  .orb-slot { height: 320px; min-height: 0; }
  .cards { grid-template-columns: 1fr; }
  .nav { flex-wrap: wrap; gap: var(--s-3); }
}
/* Below this the nav has to give up width: the language control collapses to
   the current language alone (which then cycles — see landing.js) and the
   coffee wordmark drops to its cup. */
@media (max-width: 700px) {
  /* The pill keeps its shape and becomes the trigger; the options move into a
     card beneath it. It replaced a single button that cycled to the next
     language, which showed neither what the choices were nor how to reach
     one directly. */
  .lang-trigger {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 7px 12px;
    border-radius: var(--r-pill);
    border: 1px solid var(--bn-line);
    background: var(--bn-card);
    color: var(--color-accent-700);
    font-family: inherit;
    font-size: var(--fs-cap);
    font-weight: 500;
    letter-spacing: 0.04em;
    line-height: 1;
    cursor: pointer;
    transition: border-color .2s ease;
  }
  .lang-picker[data-open="true"] .lang-trigger { border-color: var(--color-accent-300); }
  .lang-caret { width: 10px; height: 10px; transition: transform .2s ease; }
  .lang-picker[data-open="true"] .lang-caret { transform: rotate(180deg); }

  .lang-menu {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    z-index: 30;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 4px;
    min-width: 88px;
    /* A stacked list wants the card radius, not the pill one — only the rows
       inside it stay pills. */
    border-radius: var(--r-tile);
    box-shadow: var(--shadow-card);
  }
  .lang-picker[data-open="true"] .lang-menu { display: flex; }
  .lang-menu button {
    text-align: left;
    padding: 9px 14px;
    /* A row is a touch target, not a label. */
    min-height: 38px;
  }

  .bmc .wordmark-img { display: none; }
  .bmc .cup { display: block; }
  .bmc img { height: 22px; }
}

@media (max-width: 520px) {
  .join input { min-width: 0; flex: 1 1 100%; }
  .pill-ink { flex: 1 1 100%; justify-content: center; }
  .nav-right { gap: var(--s-2); }
  .pill-accent { padding: 10px 16px; font-size: var(--fs-meta); }
  .orb-slot { height: 280px; }
  .orb-still img { width: min(78%, 240px); }
  /* The clamp above floors at 40px, which the longest headline word cannot
     fit under ~360px. Desktop is untouched; this only lowers the floor. */
  .hero h1 { font-size: clamp(30px, 8.6vw, 40px); }
}
