/* The homepage hero: a light grey band on a white page, everything centred
   (Tom's reference, 14 Nov 2026). */
.intro {
  background: var(--bg);
  /* Top space follows the screen's height too, so on a laptop the whole hero,
     down to "Ask a human", fits on the first screen (Tom, 16 Nov 2026). */
  padding: clamp(calc(40px * var(--s, 1)), min(calc(8vw * var(--s, 1)), 7vh), calc(112px * var(--s, 1))) 0 clamp(calc(48px * var(--s, 1)), calc(6vw * var(--s, 1)), calc(88px * var(--s, 1)));
}
.intro__wrap {
  display: flex; flex-direction: column; align-items: center;
  text-align: center;
}
.intro__title {
  font-family: var(--display);
  font-weight: 800;
  font-size: clamp(calc(34px * var(--s, 1)), min(calc(6.4vw * var(--s, 1)), 9vh), calc(88px * var(--s, 1)));
  line-height: 1.03;
  letter-spacing: -0.035em;
  margin: 0;
  max-width: 13em;
  text-wrap: balance;
  overflow-wrap: break-word;
}
.intro__lede {
  font-size: clamp(calc(18px * var(--s, 1)), calc(1.7vw * var(--s, 1)), calc(23px * var(--s, 1)));
  line-height: 1.45;
  color: var(--ink-2);
  margin: clamp(calc(20px * var(--s, 1)), calc(2.4vw * var(--s, 1)), calc(32px * var(--s, 1))) 0 0;
  max-width: 33em;
  text-wrap: balance;
}
.intro__cta {
  margin-top: clamp(calc(28px * var(--s, 1)), calc(3vw * var(--s, 1)), calc(40px * var(--s, 1)));
  font-size: calc(17px * var(--s, 1));
  transition: transform 0.15s, background 0.15s;
}
.intro__cta:hover { background: var(--coral-fill-hover); opacity: 1; }
.intro__ask { margin-top: clamp(calc(28px * var(--s, 1)), calc(3vw * var(--s, 1)), calc(40px * var(--s, 1))); width: 100%; }
/* The widget brings its own bottom margin for the old reel; the hero ends here. */
.intro__ask .ask-root--hero { margin-bottom: 0; }

@media (max-width: 600px) {
  /* A full-width button is the easier target on a phone. */
  .intro__cta { width: 100%; max-width: calc(360px * var(--s, 1)); justify-content: center; }
}


/* The hero's two actions: early access, and a link down to the examples. */
.intro__actions {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
  gap: calc(12px * var(--s, 1)) calc(28px * var(--s, 1));
  margin: clamp(calc(28px * var(--s, 1)), calc(3vw * var(--s, 1)), calc(40px * var(--s, 1))) 0 0;
}
.intro__example {
  display: inline-flex; align-items: center; gap: calc(8px * var(--s, 1));
  font-size: calc(17px * var(--s, 1)); font-weight: 700; color: var(--ink);
  text-decoration: underline; text-underline-offset: 4px;
}
.intro__example svg { fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; transition: transform .15s ease; }
.intro__example:hover svg { transform: translateX(3px); }
.intro__example:focus-visible { outline: 2px solid var(--coral-ink); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { .intro__example svg { transition: none; } }

/* The nav's "Request early access" duplicates the hero's, so it is hidden
   while the hero's is on screen and fades in once that has scrolled off
   (home.js adds .is-shown). Only where scripts run: without them it shows. */
@media (scripting: enabled) {
  body:has(.intro__actions) .nav__pill,
  body:has(.goal) .nav__pill {
    opacity: 0; visibility: hidden;
    transition: opacity .25s ease, visibility .25s ease;
  }
  body:has(.intro__actions) .nav__pill.is-shown,
  body:has(.goal) .nav__pill.is-shown { opacity: 1; visibility: visible; }
}
@media (prefers-reduced-motion: reduce) { body:has(.intro__actions) .nav__pill, body:has(.goal) .nav__pill { transition: none; } }

/* The goal box (FANTENNA-2815): one box under the lede where a visitor types
   their goal, and "Start a plan". Shown instead of the two actions above when
   the lead chat is switched on. The chat it opens is styled in
   styles/lead-chat.css, which loads only once a goal is sent. */
.goal {
  --u: calc(1px * var(--s, 1));
  width: 100%; max-width: calc(760 * var(--u));
  margin: clamp(calc(28 * var(--u)), calc(3vw * var(--s, 1)), calc(40 * var(--u))) 0 0;
  text-align: left;
}
.goal__box {
  display: flex; flex-direction: column;
  background: var(--paper);
  border: 1.5px solid rgba(10, 10, 10, 0.14);
  border-radius: calc(28 * var(--u));
  box-shadow: 0 calc(24 * var(--u)) calc(56 * var(--u)) calc(-28 * var(--u)) rgba(10, 10, 10, 0.28);
  padding: calc(10 * var(--u));
  transition: border-color .15s ease, box-shadow .15s ease;
  cursor: text;
}
.goal__box:focus-within {
  border-color: var(--ink);
  box-shadow: 0 calc(28 * var(--u)) calc(64 * var(--u)) calc(-28 * var(--u)) rgba(10, 10, 10, 0.36);
}
.goal__input {
  display: block; width: 100%; resize: none;
  border: 0; outline: 0; background: transparent;
  font: inherit; font-size: calc(19 * var(--u)); line-height: 1.45; color: var(--ink);
  padding: calc(14 * var(--u)) calc(16 * var(--u)) calc(6 * var(--u));
  min-height: calc(3 * 1.45em + 20 * var(--u));
  field-sizing: content; max-height: 40vh;
}
.goal__input::placeholder { color: var(--ink-3); opacity: 1; }
/* "Press Tab to use this example": shown only while the box has focus and is
   empty, and only where there is a keyboard to press it on. */
.goal__field { position: relative; }
/* A cursor at the start of the empty box, so it reads as somewhere to type
   and not as a quote (Tom, 17 Nov 2026). Drawn, because focusing the box on
   load would open a phone's keyboard over the page. It goes when the box has
   focus, where the real one takes over, and when there is text in it. */
.goal__field::before {
  content: ""; position: absolute; pointer-events: none;
  left: calc(13 * var(--u)); top: calc(14 * var(--u) + 0.2em);
  width: 2px; height: 1.25em; border-radius: 1px;
  font-size: calc(19 * var(--u)); background: var(--ink);
  animation: goal-cursor 1.1s steps(1, end) infinite;
}
.goal__field:has(.goal__input:focus)::before,
.goal__field:has(.goal__input:not(:placeholder-shown))::before { display: none; }
@keyframes goal-cursor { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .goal__field::before { animation: none; } }
.goal__hint {
  position: absolute; right: calc(8 * var(--u)); bottom: 0; margin: 0;
  padding: calc(4 * var(--u)) calc(8 * var(--u)); border-radius: calc(8 * var(--u));
  background: var(--paper); color: var(--ink-3);
  font-size: calc(15 * var(--u)); line-height: 1.3;
  opacity: 0; pointer-events: none; transition: opacity .15s ease;
}
.goal__hint kbd {
  display: inline-block; padding: 0 calc(6 * var(--u)); margin: 0 calc(2 * var(--u));
  border: 1px solid rgba(10, 10, 10, 0.22); border-bottom-width: 2px; border-radius: calc(5 * var(--u));
  font: inherit; font-weight: 600; color: var(--ink-2);
}
@media (hover: hover) and (min-width: 601px) {
  .goal__input:focus:placeholder-shown + .goal__hint { opacity: 1; }
}
.goal__row {
  display: flex; align-items: center; justify-content: space-between;
  gap: calc(12 * var(--u)); padding: calc(4 * var(--u)) 0 0 calc(10 * var(--u));
}
.goal__who {
  display: inline-flex; align-items: center; gap: calc(10 * var(--u));
  font-size: calc(17 * var(--u)); line-height: 1.3; color: var(--ink-2);
}
.goal__face, .lchat__face {
  position: relative; flex: none; overflow: hidden; border-radius: 50%;
  width: calc(36 * var(--u)); height: calc(36 * var(--u));
  background: var(--sun-soft);
}
.goal__face img, .lchat__face img {
  position: absolute; display: block; max-width: none;
  width: 144.654%; height: 204.218%; left: -38.239%; top: -10.653%;
}
/* Her photo is a button: it opens her card and video, as in the loop section. */
button.goal__face, button.lchat__face { border: 0; padding: 0; cursor: pointer; transition: box-shadow .15s ease; }
button.goal__face:hover, button.goal__face[aria-expanded="true"],
button.lchat__face:hover, button.lchat__face[aria-expanded="true"] { box-shadow: 0 0 0 2px var(--paper), 0 0 0 4px var(--coral); }
button.goal__face:focus-visible, button.lchat__face:focus-visible { outline: 2px solid var(--coral-ink); outline-offset: 2px; }
.goal__send { flex: none; font-size: calc(17 * var(--u)); }
.goal__send svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .15s ease; }
.goal__send:hover svg { transform: translateX(3px); }
.goal__send:hover { background: var(--coral-fill-hover); opacity: 1; }
.goal__error { margin: calc(10 * var(--u)) calc(16 * var(--u)) 0; font-size: calc(17 * var(--u)); color: var(--coral-ink); }
.goal__error:empty { display: none; }

@media (max-width: 600px) {
  .goal__box { border-radius: calc(22 * var(--u)); }
  .goal__input { font-size: calc(18 * var(--u)); padding: calc(10 * var(--u)) calc(10 * var(--u)) calc(4 * var(--u)); min-height: calc(4 * 1.45em + 14 * var(--u)); }
  .goal__row { flex-direction: column; align-items: stretch; padding: calc(14 * var(--u)) 0 0; gap: calc(16 * var(--u)); }
  .goal__who { padding-left: calc(10 * var(--u)); text-wrap: balance; }
  .goal__send { width: 100%; justify-content: center; }
  .goal__field::before { font-size: calc(18 * var(--u)); left: calc(7 * var(--u)); top: calc(10 * var(--u) + 0.2em); }
  /* Closer to the lede and the nav, so the button clears the cookie notice on a first visit. */
  .goal { margin-top: calc(20 * var(--u)); }
  .intro:has(.goal) { padding-top: calc(20px * var(--s, 1)); }
}
@media (prefers-reduced-motion: reduce) { .goal__box, .goal__send svg { transition: none; } }

/* While the chat is open the hero is the headline, smaller, and the chat. */
.intro.is-chatting .intro__lede,
.intro.is-chatting .goal,
.intro.is-chatting .intro__ask { display: none; }
@media (min-width: 601px) {
  .intro.is-chatting { padding-top: calc(36px * var(--s, 1)); padding-bottom: calc(48px * var(--s, 1)); }
  .intro.is-chatting .intro__title { font-size: clamp(calc(26px * var(--s, 1)), calc(2.8vw * var(--s, 1)), calc(40px * var(--s, 1))); max-width: none; }
}

/* A finger needs 44px (site review, FANTENNA-2824 follow-up). */
@media (max-width: 640px) {
  .intro__example { min-height: calc(44px * var(--s, 1)); }
  .goal__face { width: calc(44px * var(--s, 1)); height: calc(44px * var(--s, 1)); }
}

/* With the goal box on, the questions widget waits in the corner until the
   hero has scrolled off (home.js sets .past-hero on <html>), so it never sits
   over the first screen. Without the script it shows as usual. */
@media (scripting: enabled) {
  /* visibility, not opacity: the widget's own fade-in animation holds its
     opacity at 1 and would win, which left it over the feature bar on launch day. */
  html.has-goal-box:not(.past-hero) .ask-root:not([data-open="true"]) { visibility: hidden; pointer-events: none; }
}
