/* Welcome page: the america.gov composition, carried by the landscapes of Samoëns.
   Each example question travels with its own photograph; the conversation styles live in app.css. */
.bonjour-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* The welcome card, tinted by a blurred copy of the current photograph. */
.bonjour-page .bonjour:not(.bonjour-chat-active) { position: relative; isolation: isolate; overflow: hidden; min-height: 0; margin: 10px 18px 0; padding: 30px 44px 44px; border-radius: 52px; background: linear-gradient(180deg, #f4f5f6 0%, #eef1f3 100%); }
.bonjour-ambient { position: absolute; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; mask-image: linear-gradient(180deg, transparent 0%, #000 30%, #000 60%, transparent 92%); }
.bonjour-ambient img { position: absolute; inset: -12%; width: 124%; height: 124%; object-fit: cover; opacity: 0; filter: blur(36px) saturate(1.3); transition: opacity 1.6s ease; }
.bonjour-ambient img.is-active { opacity: .2; }
.bonjour-chat-active .bonjour-ambient { display: none; }

.bonjour-brand { gap: 12px; font-size: 1.35rem; letter-spacing: -.01em; }
.bonjour-brand-arms { flex: none; width: auto; height: 36px; filter: drop-shadow(0 1px 1px #0b2a4a26); }

.bonjour:not(.bonjour-chat-active) .bonjour-heading { margin: clamp(44px, 8vh, 84px) auto 0; }
.bonjour .bonjour-heading h1 { margin: 0; color: #000c1f; font: 500 clamp(3.1rem, 7.4vw, 6.4rem)/1 var(--display); letter-spacing: -.045em; text-wrap: balance; }
.bonjour .bonjour-heading > p { max-width: 40rem; margin: 20px auto 0; color: #45576a; font-size: clamp(1.05rem, 1.6vw, 1.3rem); line-height: 1.45; text-wrap: balance; }

/* Composer floating on the photograph. */
.bonjour:not(.bonjour-chat-active) .bonjour-scene { position: relative; width: min(100%, 720px); margin: clamp(34px, 5.5vh, 52px) auto 0; }
.bonjour:not(.bonjour-chat-active) .discovery-form { position: absolute; z-index: 3; top: 14px; left: 14px; right: 14px; margin: 0; }
.bonjour:not(.bonjour-chat-active) .discovery-input { min-height: 76px; padding: 12px 12px 12px 26px; border: 1.5px solid #000c1f; border-radius: 40px; background: #fff; box-shadow: 0 18px 40px -18px #0b2a4a59; }
.bonjour-field { display: grid; flex: 1; min-width: 0; }
.bonjour-field > * { grid-area: 1 / 1; }
.bonjour:not(.bonjour-chat-active) .discovery-input textarea { font-size: 1.125rem; }
.bonjour-suggestion { display: none; align-self: center; padding: 11px 0; overflow: hidden; color: #4a5b6b; font-size: 1.125rem; line-height: 1.4; pointer-events: none; }
.bonjour-suggesting .bonjour-suggestion { display: block; }
.bonjour-suggesting .discovery-input textarea::placeholder { color: transparent; }
.bonjour-suggestion .bonjour-word { display: inline-block; animation: bonjour-word-in .6s cubic-bezier(.2, .7, .2, 1) both; animation-delay: calc(var(--i, 0) * 42ms); }
.bonjour-suggestion.is-leaving { animation: bonjour-text-out .32s ease-in both; }
.bonjour-chat-active .bonjour-suggestion { display: none; }
.bonjour:not(.bonjour-chat-active) .discovery-input .bonjour-send { width: 52px; min-width: 52px; height: 52px; background: #0b2a5b; color: #fff; transition: background .2s ease, transform .2s ease; }
.bonjour:not(.bonjour-chat-active) .discovery-input .bonjour-send:disabled { opacity: .88; }
.bonjour:not(.bonjour-chat-active) .discovery-input .bonjour-send:not(:disabled):active { transform: scale(.94); }

.bonjour-gallery { position: relative; overflow: hidden; aspect-ratio: 16 / 10; border-radius: 44px; background: #cfdbe3; box-shadow: 0 34px 70px -28px #0b2a4a66, 0 2px 6px #0b2a4a14; }
.bonjour-slide { position: absolute; inset: 0; margin: 0; visibility: hidden; opacity: 0; transition: opacity 1.1s ease, visibility 0s linear 1.1s; will-change: opacity; }
.bonjour-slide.is-active { visibility: visible; opacity: 1; transition: opacity 1.1s ease; }
.bonjour-photo { display: block; width: 100%; height: 100%; object-fit: cover; transform: scale(1.06); }
.bonjour-slide.is-active .bonjour-photo { animation: bonjour-drift 10s cubic-bezier(.25, .6, .3, 1) both; }
.bonjour-gallery::after { content: ''; position: absolute; inset: auto 0 0; height: 34%; background: linear-gradient(180deg, transparent, #0b1a2b52); pointer-events: none; }
.bonjour-use-example { position: absolute; z-index: 2; left: 50%; bottom: 20px; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 20px 0 16px; transform: translateX(-50%); border: 0; border-radius: 999px; background: #fffffff2; box-shadow: 0 8px 22px #0b1a2b33; color: #071b34; font-size: .9rem; font-weight: 600; white-space: nowrap; transition: background .2s ease, transform .2s ease; }
.bonjour-use-example:hover { background: #fff; }
.bonjour-use-example:active { transform: translateX(-50%) scale(.96); }
.bonjour-use-example svg { flex: none; width: 18px; height: 18px; }

/* Previous / pause / next, with a ring that shows how long the example stays. */
.bonjour-carousel { display: flex; justify-content: center; gap: 12px; margin: 28px auto 0; }
.bonjour-carousel button { position: relative; display: grid; place-items: center; width: 52px; height: 52px; padding: 0; border: 0; border-radius: 50%; background: #dfe4e8; color: #071b34; transition: background .2s ease, transform .2s ease; }
.bonjour-carousel button:hover { background: #d1d8de; }
.bonjour-carousel button:active { transform: scale(.94); }
.bonjour-carousel button > svg:not(.bonjour-ring), .bonjour-carousel [data-icon] svg { width: 22px; height: 22px; }
.bonjour-carousel [data-icon] { display: grid; }
.bonjour-carousel [data-icon][hidden] { display: none; }
.bonjour-ring { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); pointer-events: none; }
.bonjour-ring circle { fill: none; stroke: #0b2a5b; stroke-width: 2; stroke-linecap: round; stroke-dasharray: 151; stroke-dashoffset: 151; opacity: 0; }
.bonjour-playing .bonjour-ring circle { opacity: .9; animation: bonjour-ring var(--bonjour-slide-ms, 7000ms) linear both; }
.bonjour-credit { max-width: 60ch; margin: 18px auto 0; color: #5a6a79; font-size: .72rem; line-height: 1.5; text-align: center; }
.bonjour-credit a { color: inherit; text-underline-offset: 2px; }
.bonjour-chat-active .bonjour-credit { display: none; }

/* Arrival: the page settles in once, then stays still. */
.bonjour:not(.bonjour-chat-active) .bonjour-heading h1 { animation: bonjour-rise .9s cubic-bezier(.2, .7, .2, 1) both; }
.bonjour:not(.bonjour-chat-active) .bonjour-heading > p { animation: bonjour-rise .9s .08s cubic-bezier(.2, .7, .2, 1) both; }
.bonjour:not(.bonjour-chat-active) .bonjour-scene { animation: bonjour-rise 1s .16s cubic-bezier(.2, .7, .2, 1) both; }
.bonjour:not(.bonjour-chat-active) .bonjour-carousel { animation: bonjour-rise 1s .26s cubic-bezier(.2, .7, .2, 1) both; }

/* Four promises below the fold, each one true of the running service. */
.bonjour-features { display: grid; grid-template-columns: 1fr; gap: 80px 56px; width: min(100% - 40px, 1120px); margin: 104px auto 72px; }
.bonjour-conversation .bonjour-features { display: none; }
.bonjour-feature { min-width: 0; }
.bonjour-feature h2 { margin: 30px 0 12px; color: #000c1f; font: 500 clamp(1.7rem, 3vw, 2.3rem)/1.12 'Public Sans', Arial, sans-serif; letter-spacing: -.03em; text-wrap: balance; }
.bonjour-feature p { max-width: 42ch; margin: 0 0 18px; color: #45576a; font-size: 1.05rem; line-height: 1.6; }
.bonjour-feature > a { display: inline-flex; align-items: center; min-height: 44px; color: #000c1f; font-weight: 600; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 5px; }
.bonjour-feature > a:hover { text-decoration-thickness: 2px; }
.bonjour-feature-visual { position: relative; overflow: hidden; aspect-ratio: 4 / 3; border-radius: 40px; }

.bonjour-feature-sources { display: flex; flex-direction: column; justify-content: center; gap: 14px; background: linear-gradient(160deg, #dbe6ed, #f2f4f5 70%); }
.bonjour-marquee-row { overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.bonjour-marquee-row > div { display: flex; gap: 10px; width: max-content; animation: bonjour-marquee 46s linear infinite; }
.bonjour-marquee-row[data-direction="reverse"] > div { animation-direction: reverse; animation-duration: 54s; }
.bonjour-marquee-row span { padding: 12px 20px; border-radius: 999px; background: #fff; box-shadow: 0 1px 2px #0b2a4a1f, 0 8px 20px -12px #0b2a4a40; color: #071b34; font-size: .95rem; font-weight: 500; white-space: nowrap; }

.bonjour-feature-night { display: grid; place-items: center; background: radial-gradient(120% 90% at 50% 0%, #1d3f80 0%, #0c2148 52%, #061430 100%); }
.bonjour-feature-night::before { content: ''; position: absolute; top: 0; left: 0; width: 2px; height: 2px; border-radius: 50%; background: transparent; box-shadow: 34px 22px #fff, 88px 64px #ffffffa0, 140px 30px #fff, 196px 92px #ffffffb0, 250px 40px #fff, 310px 18px #ffffff90, 366px 70px #fff, 420px 34px #ffffffa0, 470px 96px #fff, 520px 24px #ffffffb0, 60px 128px #ffffff80, 170px 150px #fff, 290px 132px #ffffff90, 400px 160px #fff, 500px 140px #ffffff80, 120px 196px #ffffff70, 230px 210px #fff, 350px 222px #ffffff90, 450px 200px #ffffff70, 556px 176px #fff, 24px 250px #ffffff60, 600px 60px #ffffffa0, 640px 120px #fff, 700px 40px #ffffff90; animation: bonjour-twinkle 5s ease-in-out infinite alternate; }
.bonjour-feature-ridge { position: absolute; inset: auto 0 0; width: 100%; height: 38%; fill: #050f24; }
.bonjour-feature-badge { position: relative; display: grid; place-items: center; width: clamp(104px, 22%, 136px); aspect-ratio: 1; border-radius: 50%; background: #e9edf0; box-shadow: 0 0 0 14px #ffffff10, 0 0 0 30px #ffffff08, 0 20px 50px #0009; color: #071b34; animation: bonjour-float 6s ease-in-out infinite; }
.bonjour-feature-lock { width: 42%; height: 42%; }

.bonjour-feature-seals { display: grid; place-items: center; background: #eef1f3; }
.bonjour-feature-seals ul { display: grid; grid-template-columns: repeat(3, auto); gap: 18px 22px; margin: 0; padding: 0; list-style: none; }
.bonjour-seal { display: grid; place-items: center; width: clamp(96px, 13vw, 128px); aspect-ratio: 1; padding: 8px; border-radius: 50%; background: #fff; box-shadow: inset 0 0 0 6px #f4f6f7, inset 0 0 0 7px #d9e1e6, 0 12px 28px -14px #0b2a4a59; color: #0b2a5b; font: 600 clamp(.7rem, 1.1vw, .84rem)/1.2 var(--display); text-align: center; hyphens: none; animation: bonjour-float 7s ease-in-out infinite; }
.bonjour-seal:nth-child(3n + 2) { transform: translateY(26px); animation-delay: -2.4s; }
.bonjour-seal:nth-child(3n) { animation-delay: -4.6s; }
.bonjour-seal span { overflow-wrap: normal; word-break: keep-all; }

.bonjour-feature-phone { display: grid; place-items: end center; background: linear-gradient(160deg, #e1e9ee, #f5f6f7 75%); }
.bonjour-phone { display: flex; flex-direction: column; gap: 12px; width: min(62%, 250px); height: 86%; padding: 46px 16px 16px; border: 9px solid #0c1a2c; border-bottom: 0; border-radius: 40px 40px 0 0; background: #fff; box-shadow: 0 30px 60px -24px #0b2a4a80; }
.bonjour-phone-ask { align-self: flex-end; max-width: 88%; padding: 9px 14px; border-radius: 18px; background: #f1f3f5; color: #17283b; font-size: .78rem; line-height: 1.35; animation: bonjour-bubble 9s ease-in-out infinite both; }
.bonjour-phone-answer { display: grid; gap: 7px; width: 90%; animation: bonjour-bubble 9s 1.2s ease-in-out infinite both; }
.bonjour-phone-answer i { display: block; height: 8px; border-radius: 4px; background: #dfe5ea; }
.bonjour-phone-answer i:nth-child(2) { width: 82%; }
.bonjour-phone-answer i:nth-child(3) { width: 58%; background: #c9d8ec; }
.bonjour-phone-ask-2 { animation-delay: 2.6s; }

/* Scroll reveal only once JavaScript is known to be running. */
.bonjour-reveal-ready [data-reveal] { opacity: 0; transform: translateY(28px); transition: opacity .8s ease, transform .9s cubic-bezier(.2, .7, .2, 1); }
.bonjour-reveal-ready [data-reveal].is-visible { opacity: 1; transform: none; }

@keyframes bonjour-rise { from { opacity: 0; transform: translateY(18px); } }
@keyframes bonjour-drift { from { transform: scale(1.1); } to { transform: scale(1); } }
/* Opacity and transform only: they stay on the compositor, so the text moves smoothly on modest phones. */
@keyframes bonjour-word-in { from { opacity: 0; transform: translateY(.45em); } }
@keyframes bonjour-text-out { to { opacity: 0; transform: translateY(-.35em); } }
@keyframes bonjour-ring { from { stroke-dashoffset: 151; } to { stroke-dashoffset: 0; } }
@keyframes bonjour-marquee { to { transform: translateX(calc(-50% - 5px)); } }
@keyframes bonjour-twinkle { from { opacity: .55; } to { opacity: 1; } }
@keyframes bonjour-float { 50% { translate: 0 -8px; } }
@keyframes bonjour-bubble { 0%, 6% { opacity: 0; transform: translateY(10px); } 14%, 86% { opacity: 1; transform: none; } 94%, 100% { opacity: 0; transform: translateY(-6px); } }

@media (min-width: 900px) {
  .bonjour-features { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 700px) {
  .bonjour-page .bonjour:not(.bonjour-chat-active) { margin: 6px 8px 0; padding: 18px 16px 28px; border-radius: 34px; }
  .bonjour-brand { gap: 9px; font-size: 1.1rem; }
  .bonjour-brand-arms { height: 30px; }
  .bonjour-menu summary { padding: 0 18px; }
  .bonjour:not(.bonjour-chat-active) .bonjour-heading { margin-top: clamp(28px, 6vh, 52px); }
  .bonjour .bonjour-heading h1 { font-size: clamp(2.9rem, 13.5vw, 4.2rem); }
  .bonjour .bonjour-heading > p { max-width: 26ch; margin-top: 16px; }
  .bonjour:not(.bonjour-chat-active) .bonjour-scene { width: calc(100% + 32px); margin: clamp(24px, 4.5vh, 40px) -16px 0; }
  /* Height from the screen, width from the card: aspect-ratio plus max-height shrank the photo sideways on short screens. */
  .bonjour-gallery { aspect-ratio: auto; width: 100%; height: clamp(300px, min(122vw, 62vh), 560px); height: clamp(300px, min(122vw, 62svh), 560px); border-radius: 30px; }
  .bonjour-ambient { display: none; }
  .bonjour:not(.bonjour-chat-active) .discovery-form { top: 10px; left: 10px; right: 10px; }
  .bonjour:not(.bonjour-chat-active) .discovery-input { align-items: flex-end; min-height: 0; padding: 10px 10px 10px 20px; border-radius: 30px; }
  .bonjour:not(.bonjour-chat-active) .bonjour-field { min-height: calc(2.8em + 22px); }
  .bonjour:not(.bonjour-chat-active) .discovery-input textarea, .bonjour-suggestion { font-size: 1.05rem; }
  .bonjour-suggestion { align-self: start; }
  .bonjour:not(.bonjour-chat-active) .discovery-input .bonjour-send { width: 48px; min-width: 48px; height: 48px; }
  .bonjour-use-example { bottom: 16px; }
  .bonjour-carousel { margin-top: 24px; }
  .bonjour-features { gap: 64px; margin-top: 72px; }
  .bonjour-feature-visual { border-radius: 32px; }
}
@media (max-width: 380px) {
  .bonjour-page .bonjour:not(.bonjour-chat-active) { margin: 4px 4px 0; padding: 14px 12px 24px; border-radius: 28px; }
  .bonjour:not(.bonjour-chat-active) .bonjour-scene { width: calc(100% + 24px); margin-inline: -12px; }
  .bonjour-brand { font-size: 1rem; }
  .bonjour .bonjour-heading > p { font-size: 1rem; }
  .bonjour:not(.bonjour-chat-active) .discovery-input textarea, .bonjour-suggestion { font-size: 1rem; }
  .bonjour-use-example { font-size: .85rem; padding-inline: 14px 16px; }
}
/* Phones held sideways: the photo keeps most of the screen, the title steps back. */
@media (max-height: 520px) and (orientation: landscape) {
  .bonjour:not(.bonjour-chat-active) .bonjour-heading { margin-top: 12px; }
  .bonjour .bonjour-heading h1 { font-size: clamp(2.2rem, 7vw, 3.2rem); }
  .bonjour .bonjour-heading > p { margin-top: 8px; }
  .bonjour:not(.bonjour-chat-active) .bonjour-scene { width: min(100%, 640px); margin: 16px auto 0; }
  .bonjour-gallery { aspect-ratio: auto; height: 82vh; height: 82svh; max-height: none; border-radius: 28px; }
}
@media (prefers-reduced-motion: reduce) {
  .bonjour-reveal-ready [data-reveal] { opacity: 1; transform: none; }
  .bonjour-photo { transform: none; }
}
@media print {
  .bonjour-features, .bonjour-ambient, .bonjour-carousel, .bonjour-credit { display: none; }
}
