/* ========================================
   HERO WRAPPER - Full-width bordered section
   ======================================== */

.hero-wrapper {
  position: relative;
  display: grid;
  place-items: center;
  margin: 50px 10px 10px;
  box-sizing: border-box;
  height: calc(100dvh - 60px);
  border: 1px solid #e8eaed;
  border-radius: 10px;
  overflow: hidden;
}

.hero-wrapper::before {
  content: '';
  position: absolute;
  /* One tile wider than the hero, so the drift (a transform, which the
     GPU moves without repainting) never shows an edge */
  inset: 0 -300px 0 0;
  background-image: url('/images/visa-stamps-bg.webp');
  background-repeat: repeat;
  background-size: 300px;
  background-position: 0 0;
  opacity: 0;
  filter: grayscale(100%);
  pointer-events: none;
  z-index: 0;
  animation: bg-scroll 40s linear infinite;
  transition: opacity 1.3s ease;
  will-change: transform, opacity;
}

.hero-wrapper.hero-bg-ready::before {
  opacity: 0.07;
}

/* One tile (300px) to the left, then again: the same drift as moving the
   background, but on the GPU */
@keyframes bg-scroll {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-300px);
  }
}

.hero-wrapper > * {
  position: relative;
  z-index: 1;
}

/* The circle (its mask) stays under the pointer while the coloured stamps
   drift inside it, in step with the grey ones */
.hero-color-lens {
  position: absolute;
  inset: 0;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  z-index: 0;
  transition: opacity 1.3s ease;
  will-change: opacity;
  -webkit-mask-image: radial-gradient(
    circle 130px at var(--lens-x, -200px) var(--lens-y, -200px),
    rgba(0, 0, 0, 1) 0%,
    rgba(0, 0, 0, 0.3) 50%,
    transparent 100%
  );
  mask-image: radial-gradient(
    circle 130px at var(--lens-x, -200px) var(--lens-y, -200px),
    rgba(0, 0, 0, 1) 0%,
    rgba(0, 0, 0, 0.3) 50%,
    transparent 100%
  );
}

.hero-color-lens::before {
  content: '';
  position: absolute;
  inset: 0 -300px 0 0;
  background-image: url('/images/visa-stamps-bg.webp');
  background-repeat: repeat;
  background-size: 300px;
  background-position: 0 0;
  animation: bg-scroll 40s linear infinite;
  will-change: transform;
}

.hero-wrapper.hero-bg-ready .hero-color-lens {
  opacity: 0.3;
}

@keyframes cta-shine {
  from {
    left: -80%;
  }
  to {
    left: 130%;
  }
}

/* The phone slides up from below the screen while it comes out of the blur */
@keyframes hero-phone-rise {
  from {
    opacity: 0;
    filter: blur(12px);
    transform: translateY(60vh);
  }
  to {
    opacity: 1;
    filter: none;
    transform: none;
  }
}

/* Like mobbin.com: each part comes out of a soft blur as it settles */
@keyframes hero-blur-in {
  from {
    opacity: 0;
    filter: blur(12px);
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    filter: none;
    transform: none;
  }
}

@keyframes hero-nav-fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-wrapper::before,
  .hero-color-lens {
    transition: none;
  }
}

/* ========================================
   HERO SECTION - written for phones first; wider screens get the framed
   hero, the centred menu and the phone lift at the end of this file
   ======================================== */

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-xl);
  width: 100%;
  max-width: 800px;
  margin: 0;
  padding: clamp(24px, 5vh, 56px) 100px;
  text-align: center;
  transform: translateY(clamp(-40px, -4vh, -20px));
}

/* Hero Announcement Badge */
.hero-announcement-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: fit-content;
  margin: 0 auto 24px;
  padding: 5px 16px 5px 5px;
  background: #f0faf3;
  border: 1px solid #d4e8da;
  border-radius: 999px;
  font-size: 14px;
}

.hero-announcement-badge-label {
  display: inline-block;
  padding: 3px 10px;
  background: #4aba6e;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  border-radius: 999px;
  line-height: 1.4;
}

.hero-announcement-badge-text {
  font-weight: 500;
  color: #3d7a50;
}

/* Hero Title */
.hero h1 {
  line-height: var(--leading-tight);
  margin: 0;
  color: var(--text-primary);
  letter-spacing: var(--tracking-tight);
  max-width: none;
}

.hero-subtitle {
  line-height: var(--leading-relaxed);
  color: var(--text-secondary);
  margin: 0;
  max-width: 600px;
}

.hero-chat-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-sm);
  margin-top: 0;
  flex-wrap: wrap;
}

.hero-chat-action {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.9rem;
  border: 1px solid rgba(17, 17, 17, 0.12);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.88);
  color: rgba(17, 17, 17, 0.68);
  text-decoration: none;
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  line-height: 1;
  transition:
    border-color 0.2s ease,
    color 0.2s ease,
    background 0.2s ease;
}

.hero-chat-action img {
  width: 16px;
  height: 16px;
  opacity: 0.72;
}

.hero-chat-action:first-child img {
  width: 18px;
  height: 18px;
}

.hero-chat-action:hover {
  background: #fff;
  border-color: rgba(17, 17, 17, 0.18);
  color: var(--text-primary);
}

/* The phone hero, on every screen (wider screens: see the end of this file) */
.hero-wrapper {
  margin: 0;
  /* Ends exactly where the phone is cut, on every screen height; it is
     never stretched to the screen, which on a tall screen would show the
     phone below its input */
  height: auto;
  /* Clips the phone where it is cut (see .hero-phone-mock) */
  overflow: hidden;
  /* Content starts at the top even when it is shorter than the screen */
  align-items: start;
  padding: 0 12px;
  border: none;
  border-bottom: 1px solid #e8eaed;
  border-radius: 0;
}

.hero-mobile-nav {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  /* Above the hero's transparent box so taps reach the controls */
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
}

.hero-mobile-nav-brand {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-primary);
  text-decoration: none;
  font-size: 1rem;
  font-weight: var(--font-semibold);
}

.hero-mobile-nav-brand img {
  width: 22px;
  height: 22px;
  border-radius: 50%;
}

.hero-mobile-nav-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hero-mobile-nav-lang {
  display: inline-flex;
  cursor: pointer;
  align-items: center;
  padding: 3px;
  gap: 2px;
  border: 1px solid rgba(17, 17, 17, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  font: inherit;
  /* A link to the page in the other language */
  text-decoration: none;
}

.hero-mobile-nav-lang-option {
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: var(--font-semibold);
  color: rgba(17, 17, 17, 0.55);
}

.hero-mobile-nav-lang-option.is-active {
  background: #111;
  color: #fff;
}

/* The centred menu, on wider screens only (see the end of this file) */
.hero-nav-menu {
  display: none;
}

.hero-mobile-nav-link {
  color: var(--text-primary);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: var(--font-medium);
}

.hero {
  height: auto;
  box-sizing: border-box;
  justify-content: flex-start;
  padding: 100px 0 0;
  gap: 1rem;
  transform: none;
}

/* The hero ends just under the phone's message input, 60% down the phone,
   or at the bottom of the screen when that is lower. The negative margin
   takes the rest of the phone out of the layout (a 3px titanium band and a
   9px black bezel around a 1179x2556 screen): it shows the top 59.5% of the
   screen, down just past the chat's input bar and above the keyboard's top
   edge, and the wrapper clips the rest */
.hero-phone-mock {
  --phone-width: min(300px, 80vw);
  /* The screen, inside the band and the bezel */
  --phone-screen: calc(var(--phone-width) - 24px);
  display: block;
  width: var(--phone-width);
  margin: 28px auto 0;
  margin-bottom: calc(-0.405 * (min(300px, 80vw) - 24px) * 2556 / 1179 - 12px);
  position: relative;
  z-index: 2;
  will-change: transform;
}

/* iPhone 15/16 Pro proportions: a brushed titanium band around a thin black
   bezel; the screen's corners are 14% of its width, like the real display */
.hero-phone-mock-frame {
  position: relative;
  padding: 9px;
  border: 3px solid transparent;
  border-radius: calc(var(--phone-screen) * 0.14 + 12px);
  background:
    linear-gradient(#0b0b0c, #0b0b0c) padding-box,
    linear-gradient(
        140deg,
        #d7d7da 0%,
        #6e6e73 14%,
        #b9b9be 30%,
        #4b4b50 52%,
        #9c9ca1 74%,
        #3f3f44 88%,
        #c4c4c8 100%
      )
      border-box;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.06),
    0 6px 16px rgba(17, 17, 17, 0.16),
    0 28px 56px rgba(17, 17, 17, 0.26);
}

/* Diagonal light reflection across the glass */
.hero-phone-mock-frame::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
  border-radius: inherit;
  background: linear-gradient(125deg, rgba(255, 255, 255, 0.09), transparent 32%);
  pointer-events: none;
}

/* Dynamic Island, sized and placed from the real screen (126 x 37 points,
   11 points down, on a 393-point-wide screen) */
.hero-phone-mock-frame::after {
  content: '';
  position: absolute;
  z-index: 3;
  left: 50%;
  top: calc(9px + var(--phone-screen) * 11 / 393);
  width: calc(var(--phone-screen) * 126 / 393);
  height: calc(var(--phone-screen) * 37 / 393);
  transform: translateX(-50%);
  border-radius: 999px;
  background: #000;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

/* Side buttons set into the titanium band, placed like an iPhone Pro's:
   the action button and the two volume keys on the left (one strip with
   gaps), the side button on the right */
.hero-phone-mock::before,
.hero-phone-mock::after {
  content: '';
  position: absolute;
  z-index: -1;
  width: 4px;
  border-radius: 2px;
}

.hero-phone-mock::before {
  --w: var(--phone-screen);
  left: -2px;
  top: calc(var(--w) * 0.5);
  height: calc(var(--w) * 0.555);
  background: linear-gradient(
    to bottom,
    #8e8e93 0,
    #8e8e93 calc(var(--w) * 0.1),
    transparent calc(var(--w) * 0.1),
    transparent calc(var(--w) * 0.2),
    #8e8e93 calc(var(--w) * 0.2),
    #8e8e93 calc(var(--w) * 0.355),
    transparent calc(var(--w) * 0.355),
    transparent calc(var(--w) * 0.4),
    #8e8e93 calc(var(--w) * 0.4)
  );
}

.hero-phone-mock::after {
  right: -2px;
  top: calc(var(--phone-screen) * 0.73);
  height: calc(var(--phone-screen) * 0.24);
  background: #8e8e93;
}

.hero-phone-mock-frame img,
.hero-phone-mock-frame video {
  position: relative;
  display: block;
  box-sizing: border-box;
  width: 100%;
  aspect-ratio: 1179 / 2556;
  object-fit: cover;
  border-radius: calc(var(--phone-screen) * 0.14);
  background: #f5f5f7;
}

.hero-announcement-badge {
  display: none;
}

/* Slower stamp drift on mobile */
.hero-wrapper::before {
  animation-duration: 80s;
}

/* Slightly richer stamp texture behind the phone area: the soft oval (the
   mask) stays put while the stamps drift inside it */
.hero-stamps-rich {
  position: absolute;
  inset: 0;
  overflow: hidden;
  opacity: 0;
  filter: grayscale(100%);
  pointer-events: none;
  z-index: 0;
  transition: opacity 1.3s ease;
  -webkit-mask-image: radial-gradient(ellipse 75% 40% at 50% 72%, #000, transparent 72%);
  mask-image: radial-gradient(ellipse 75% 40% at 50% 72%, #000, transparent 72%);
}

.hero-stamps-rich::before {
  content: '';
  position: absolute;
  inset: 0 -300px 0 0;
  background-image: url('/images/visa-stamps-bg.webp');
  background-repeat: repeat;
  background-size: 300px;
  animation: bg-scroll 80s linear infinite;
  will-change: transform;
}

.hero-wrapper.hero-bg-ready .hero-stamps-rich {
  opacity: 0.06;
}

/* Staggered entrance like mobbin.com: title -> subtitle -> button ->
   social proof -> phone, each fading in from a blur, then the shine
   sweeps the button. The nav fades in place. */
.hero-mobile-nav {
  animation: hero-nav-fade 0.7s ease-out backwards;
}

.hero > :first-child,
.hero-subtitle,
.hero-chat-actions,
.hero-social-proof-text,
.hero-social-proof-avatars img {
  animation: hero-blur-in 0.8s cubic-bezier(0.22, 1, 0.36, 1) backwards;
}

.hero > :first-child {
  animation-delay: 0.1s;
}

/* The title comes in word by word, like the faces: each word out of its
   own blur, one after another */
.hero > .hero-head {
  animation: none;
}

#hero-title-text .hw {
  display: inline-block;
  animation: hero-title-in 1.4s cubic-bezier(0.22, 1, 0.36, 1) backwards;
  animation-delay: calc(0.1s + var(--i) * 0.16s);
}

/* Slower and softer than the rest of the hero: each word clears from a
   deeper blur, a beat after the one before */
@keyframes hero-title-in {
  from {
    opacity: 0;
    filter: blur(18px);
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    filter: none;
    transform: none;
  }
}

.hero-subtitle {
  animation-delay: 0.2s;
}

.hero-chat-actions {
  animation-delay: 0.3s;
}

.hero-social-proof-text {
  animation-delay: 0.4s;
}

.hero-social-proof-avatars img:nth-child(1) {
  animation-delay: 0.45s;
}

.hero-social-proof-avatars img:nth-child(2) {
  animation-delay: 0.5s;
}

.hero-social-proof-avatars img:nth-child(3) {
  animation-delay: 0.55s;
}

.hero-social-proof-avatars img:nth-child(4) {
  animation-delay: 0.6s;
}

.hero-social-proof-avatars img:nth-child(5) {
  animation-delay: 0.65s;
}

/* Diagonal shine across the CTA right after it lands */
.hero-chat-actions .hero-chat-action {
  position: relative;
  overflow: hidden;
}

.hero-chat-actions .hero-chat-action::after {
  content: '';
  position: absolute;
  top: 0;
  left: -80%;
  width: 55%;
  height: 100%;
  background: linear-gradient(
    105deg,
    transparent,
    rgba(255, 255, 255, 0.35),
    transparent
  );
  transform: skewX(-20deg);
  animation: cta-shine 0.9s ease-in-out 1.05s 1 both;
  pointer-events: none;
}

/* The phone stays hidden until its chat is ready (public/hero-chat.js),
   then slides up out of the blur. Phones: it starts at once, with no pause,
   so it is not left behind the rest of the hero */
.hero-phone-mock {
  opacity: 0;
}

.hero-phone-mock.is-loaded {
  opacity: 1;
  animation: hero-phone-rise 1s cubic-bezier(0.22, 1, 0.36, 1) backwards;
}

.hero-subtitle {
  font-size: 1.05rem;
  line-height: 1.55;
  color: #444;
  padding: 0 12px;
}

/* The phone lines are set by hand, the first "Consul prepares your visa
   application": on a screen narrower than an iPhone the text shrinks with
   it, so that line still fits on one */
.hero-subtitle-short {
  font-size: min(1em, 4.6vw);
}

.hero h1 {
  font-size: var(--text-4xl);
}

.hero-announcement-badge {
  font-size: 12px;
  gap: 6px;
  padding: 4px 12px 4px 4px;
  margin-bottom: 14px;
}

.hero-announcement-badge-label {
  font-size: 9px;
  padding: 2px 7px;
}

.hero-subtitle {
  font-size: var(--text-lg);
}

.hero-chat-actions {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr;
  justify-items: center;
  gap: 0.75rem;
  margin-top: 0;
}

.hero-chat-actions > .hero-chat-action {
  width: min(200px, 100%);
}

.hero-chat-action {
  width: min(200px, 100%);
  box-sizing: border-box;
  justify-content: center;
  padding: 0.7rem 1.5rem;
  font-size: 1rem;
  font-weight: var(--font-semibold);
  white-space: nowrap;
  background: #111;
  border-color: #111;
  border-radius: 999px;
  color: #fff;
  transition:
    transform 0.15s ease,
    background 0.2s ease;
}

.hero-chat-action:active {
  transform: scale(0.97);
}

.hero-social-proof {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}

.hero-social-proof-avatars {
  display: flex;
}

.hero-social-proof-avatars img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid #fff;
  object-fit: cover;
}

.hero-social-proof-avatars img + img {
  margin-left: -18px;
}

.hero-social-proof-avatars img {
  position: relative;
}

.hero-social-proof-text {
  margin: 0;
  font-size: 0.85rem;
  color: #666;
}

.hero-social-proof-text a {
  color: var(--text-primary);
  font-weight: var(--font-semibold);
  text-decoration: underline;
}

.hero-chat-action:hover {
  background: #111;
  border-color: #111;
  color: #fff;
}

.hero-chat-action img {
  /* Renders the dark glyph white on the solid button */
  filter: brightness(0) invert(1);
  opacity: 1;
}

.hero-chat-action img {
  width: 18px;
  height: 18px;
}

.hero-chat-action:first-child img {
  width: 22px;
  height: 22px;
}

@media (max-width: 650px) {

  .hero-subtitle {
    font-size: 1.05rem;
  }

  .hero-chat-action {
    gap: 0.5rem;
    padding: 0.7rem 0.45rem;
    font-size: 1rem;
    white-space: nowrap;
  }

  .hero-chat-action img {
    width: 18px;
    height: 18px;
  }

  .hero-chat-action:first-child img {
    width: 22px;
    height: 22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-wrapper::before,
  .hero-stamps-rich,
  .hero-stamps-rich::before,
  .hero-color-lens,
  .hero-color-lens::before {
    transition: none;
    animation: none;
  }

  .hero-mobile-nav,
  .hero > :first-child,
  #hero-title-text .hw,
  .hero-subtitle,
  .hero-chat-actions,
  .hero-social-proof-text,
  .hero-social-proof-avatars img,
  .hero-chat-actions .hero-chat-action::after,
  .hero-phone-mock.is-loaded {
    animation: none;
  }
}

/* Arrived from another of the site's pages (Landing.astro): the hero is
   there as it was left, with no entrance (the stamps too, when their
   picture is at hand: index.html), and the phone, held back until its chat
   is ready, is there too: its reveal, after the fade between the pages,
   blinked */
html.no-intro .hero-mobile-nav,
html.no-intro .hero > :first-child,
html.no-intro #hero-title-text .hw,
html.no-intro .hero-subtitle,
html.no-intro .hero-chat-actions,
html.no-intro .hero-social-proof-text,
html.no-intro .hero-social-proof-avatars img,
html.no-intro .hero-chat-actions .hero-chat-action::after {
  animation: none;
}

html.no-intro .hero-phone-mock {
  opacity: 1;
}

html.no-intro .hero-phone-mock.is-loaded {
  animation: none;
}

/* Wider screens: the same hero, framed like the earlier desktop page with
   the same margin on every side of the screen, and a centred menu */
@media (min-width: 769px) {
  /* The phone rises from below the screen, after the rest of the hero */
  html:not(.no-intro) .hero-phone-mock.is-loaded {
    animation: hero-phone-rise 1s cubic-bezier(0.22, 1, 0.36, 1) 0.5s backwards;
  }


  /* The frame's margin on every side; it grows to hold the copy and the
     top of the phone, so it can run past the bottom of the screen */
  .hero-wrapper {
    margin: 10px;
    border: 1px solid #e8eaed;
    border-radius: 10px;
  }

  .hero-mobile-nav {
    padding: 20px 32px;
  }

  .hero-nav-menu {
    position: absolute;
    top: 50%;
    left: 50%;
    display: flex;
    align-items: center;
    --hero-menu-gap: 12px;
    gap: var(--hero-menu-gap);
    transform: translate(-50%, -50%);
  }

  /* Black links with a dot between them; a hovered link grows a little */
  .hero-nav-menu-link {
    position: relative;
    padding: 6px 12px;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: var(--font-medium);
    white-space: nowrap;
  }

  /* Only the words grow, so the dots between the links stay put */
  .hero-nav-menu-link > span {
    display: inline-block;
    transition: transform 0.2s ease-out;
  }

  /* inline-block outranks the page's language switch: hide the other
     language here too */
  html[lang='ru'] .hero-nav-menu-link > [data-l='en'],
  html:not([lang='ru']) .hero-nav-menu-link > [data-l='ru'] {
    display: none;
  }

  /* Centred in the gap before the link, outside its pill */
  .hero-nav-menu-link + .hero-nav-menu-link::before {
    content: '·';
    position: absolute;
    left: calc(var(--hero-menu-gap) / -2);
    top: 50%;
    transform: translate(-50%, -50%);
    color: var(--text-primary);
    pointer-events: none;
  }

  .hero-nav-menu-link:hover > span {
    transform: scale(1.08);
  }

  /* Blog is in the menu now */
  .hero-mobile-nav-link {
    display: none;
  }

  /* The centred menu has the same links as the dots */
  .hero-mobile-nav .site-menu {
    display: none;
  }

  /* At least as tall as the screen inside the frame's margin, with the
     phone's cut on the frame's bottom edge and the copy just above it: on
     a tall screen the spare room goes above the copy, on a short one the
     frame runs past the screen */
  .hero {
    min-height: calc(100dvh - 22px);
    justify-content: flex-end;
    padding: 96px 0 0;
    gap: 1.25rem;
  }

  .hero-subtitle {
    max-width: 620px;
    margin: 0 auto;
    font-size: 1.25rem;
  }

  /* One flowing paragraph instead of the phone's two lines */
  .hero-subtitle br {
    display: none;
  }

  /* The phone under the copy, cut like the phone's: the frame ends just
     under its message input. It grows with the screen's height to fill
     the frame (the copy above it takes about 486px, and the phone shows
     1.22 times its width), from 300px to 440px */
  .hero-phone-mock {
    --phone-width: clamp(300px, (100dvh - 486px) / 1.22, 440px);
    flex: none;
    width: var(--phone-width);
    margin: 28px auto calc(-0.405 * (var(--phone-width) - 24px) * 2556 / 1179 - 12px);
  }
}

/* Narrow wider screens: a tighter menu, so it clears the logo in Russian too */
@media (min-width: 769px) and (max-width: 899px) {
  .hero-nav-menu {
    --hero-menu-gap: 6px;
  }

  .hero-nav-menu-link {
    padding: 6px 8px;
  }
}

/* ========================================
   THE DIRECT HERO (.hero--direct)
   ======================================== */

/* Get Started and Learn More stand under the promises, and the phone under
   them, cut by the frame's bottom edge; on wide screens the two side phones
   stand beside it (public/css/expert.css) */
.hero--direct .hero-chat-actions {
  margin-top: 8px;
}

/* With an application under way: the way back to it, in place of Get
   Started */
.hero-chat-actions .hero-continue {
  display: none;
}

html.start-saved .hero-chat-actions .hero-get-started {
  display: none;
}

html.start-saved .hero-chat-actions .hero-continue {
  display: inline-flex;
  white-space: nowrap;
}

/* Prepare (or Continue) as wide as its words, with a little more room at
   its sides than above and below them (18px to 13px on phones) */
.hero-chat-actions > .hero-get-started,
.hero-chat-actions > .hero-continue {
  width: auto;
  padding-inline: 1.07rem;
}

/* The terms, right under the box on every screen */
.hero--direct .hero-terms {
  display: block;
  margin: -4px 0 6px;
  font-size: 0.78rem;
  color: #8e8e96;
}

/* On a phone the two links take their own line */
.hero--direct .hero-terms-links {
  display: block;
}

.hero--direct .hero-terms a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

@media (min-width: 769px) {
  .hero-email {
    width: min(100%, 520px);
    padding-left: 24px;
  }

  .hero-email input,
  .hero-email button {
    height: 46px;
  }

  .hero-email button {
    width: 46px;
  }

  .hero--direct .hero-terms {
    margin: 0;
    font-size: 0.8rem;
  }

  .hero--direct .hero-terms-links {
    display: inline;
  }
}

/* One framed screen on every device: the same sheet as the chat it opens,
   a gap on every side, the content in the middle and the next section only
   after a scroll. svh: the frame keeps its height while a phone's address
   bar slides away */
.hero-wrapper.hero--direct {
  margin: 10px;
  min-height: calc(100svh - 20px);
  align-items: center;
  padding: 0 12px;
  border: 1px solid #e8eaed;
  border-radius: 10px;
  background: #fbfbfa;
}

/* The copy starts close under the nav, so the phone has room below it */
.hero--direct .hero {
  padding-top: 76px;
}

@media (min-width: 769px) {
  .hero--direct .hero {
    padding-top: 40px;
    gap: 1.15rem;
  }
}

/* Behind it, the visa stamps as they always were: the chat the email opens
   has them too, until a country is picked (.s-stamps, public/css/start.css) */

/* The language switch is hidden for now (it stays in the page) */
.hero--direct .hero-mobile-nav-lang {
  display: none;
}

/* The faces, the count and the refund promise come before the button
   on every screen, and the phone after it */
.hero--direct .hero-social-proof {
  margin: 0 0 6px;
}

.hero--direct .hero-chat-actions,
.hero--direct .hero-terms {
  order: 1;
}

.hero--direct .hero-phone-mock {
  order: 3;
}

/* The menu's dots are the last thing in the bar, so its card hangs from
   the bar's right edge (it is centred under the dots on the other pages) */
.hero-mobile-nav .site-menu-list {
  left: auto;
  right: 0;
  transform: none;
  transform-origin: top right;
  animation-name: hero-menu-in;
}

@keyframes hero-menu-in {
  from {
    opacity: 0;
    transform: translateY(-4px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* "Log in", in the top bar before the menu's dots, as the same pill.
   Signed in, it reads "Continue" */
.hero-login {
  display: inline-flex;
  box-sizing: border-box;
  align-items: center;
  /* As tall as the menu's button beside it */
  height: 30px;
  padding: 0 13px;
  border: 1px solid rgba(17, 17, 17, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  color: var(--text-primary);
  font-size: 0.8rem;
  font-weight: var(--font-semibold);
  text-decoration: none;
  white-space: nowrap;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.hero-login:hover {
  border-color: rgba(17, 17, 17, 0.3);
  background: #fff;
}

.hero-login--saved,
html.start-saved .hero-login {
  display: none;
}

html.start-saved .hero-login--saved {
  display: inline-flex;
}
