/* Home: the camp at night, then the three things AstrLink does. */

/* Hero: the copy over the sky; the camp, the threads and the star behind. */
.home-hero { --hero-copy: 467px; }
.home-hero:lang(en) { --hero-copy: 530px; }
.home-hero .hero-copy { position: relative; z-index: 3; padding-top: 170px; }
.home-hero h1 { max-width: 780px; }
.hero-stage { position: absolute; inset: 0; }
.hero-stage .crew { position: absolute; left: 0; right: 0; bottom: 0; z-index: 1; }
.hero-stage .threads { z-index: 2; }
.hero-stage .astr-star { z-index: 2; left: 75%; top: 230px; }

/* Quotas, as the medium desktop widget shows them: every plan side by side. */
.quota { padding-top: 40px; }
.quota-grid { display: grid; grid-template-columns: 1fr 560px; gap: 64px; align-items: center; }
.widget-wrap { margin: 0; }
.widget-frame { border-radius: 24px; background: var(--deep); padding: 22px; }
.widget { border-radius: 20px; background: #1e2127; padding: 18px 22px 20px; color: #e6e8ec; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05); }
.widget-head { font-size: 13.5px; color: #a1a6b0; }
.w-rows { margin-top: 20px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.w-row { min-width: 0; margin: -6px -8px; padding: 6px 8px; border-radius: 10px; }
.w-name { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 600; white-space: nowrap; }
.w-name img { width: 20px; height: 20px; }
.w-pct { display: block; margin-top: 12px; font-size: 28px; font-weight: 700; line-height: 1.2; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; color: #eceef1; white-space: nowrap; }
.w-bar { margin-top: 8px; height: 8px; border-radius: 4px; background: #33363d; overflow: hidden; }
.w-bar i { display: block; height: 100%; width: 100%; border-radius: 4px; background: #7fae8f; transform-origin: left; transform: scaleX(var(--left)); }
.widget.is-ready .w-bar i { transition: transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1); }
.w-sub { margin-top: 8px; display: flex; flex-direction: column; gap: 2px; font-size: 12.5px; color: #a1a6b0; white-space: nowrap; }
.w-row.is-low .w-pct { color: #d8b277; }
.w-row.is-low .w-bar i { background: #c9a46b; }
.w-row.is-empty .w-pct { color: #db8794; }
.w-row.is-empty .w-pct::before { content: "⚠ "; font-size: 0.72em; vertical-align: 0.12em; }
.w-row.is-next { animation: next-plan 1.6s ease-out; }
@keyframes next-plan { 0% { background: rgba(127, 174, 143, 0); } 25% { background: rgba(127, 174, 143, 0.14); } 100% { background: rgba(127, 174, 143, 0); } }
.widget-wrap figcaption { margin-top: 12px; text-align: center; color: #8b94a5; font-size: 13px; }
.failover { display: flex; width: fit-content; align-items: center; gap: 10px; margin-top: 22px; padding: 12px 16px; border-radius: 12px; background: #fff; border: 1px solid var(--line); font-size: 14px; color: var(--ink); transition: opacity 0.4s ease, transform 0.4s ease; }
.failover::before { content: ""; width: 8px; height: 8px; flex: none; background: var(--teal); }
.failover.is-waiting { opacity: 0; transform: translateY(6px); }

/* The office, live. */
.office { margin-top: 44px; border-radius: 20px; overflow: hidden; border: 1px solid var(--line); background: #fff; }
.office .bar { display: flex; align-items: center; gap: 10px; padding: 13px 20px; border-bottom: 1px solid var(--line); font-size: 13.5px; color: var(--muted); }
.office .bar i { position: relative; width: 8px; height: 8px; border-radius: 50%; background: #3fbf7f; }
.office .bar i::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: #3fbf7f; animation: live-dot 2.4s ease-out infinite; }
@keyframes live-dot { from { transform: scale(1); opacity: 0.5; } 70%, to { transform: scale(2.8); opacity: 0; } }
.office .bar b { color: var(--ink); }
.office .crew { --crew-min: 170px; --crew-max: 290px; }

/* The product video. */
.showcase-frame { position: relative; margin-top: 40px; border-radius: 20px; overflow: hidden; background: var(--deep); aspect-ratio: 16 / 9; box-shadow: 0 30px 80px rgba(60, 50, 20, 0.08); }
.showcase-frame video { width: 100%; height: 100%; object-fit: cover; }
.showcase-toggle { position: absolute; right: 16px; bottom: 16px; width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(13, 18, 26, 0.72); cursor: pointer; display: grid; place-items: center; transition: background 0.2s ease; }
.showcase-toggle:hover { background: rgba(13, 18, 26, 0.88); }
.showcase-toggle::before { content: ""; width: 0; height: 0; margin-left: 3px; border-style: solid; border-width: 8px 0 8px 13px; border-color: transparent transparent transparent #fff; }
[data-playing="true"] .showcase-toggle::before { width: 12px; height: 14px; margin: 0; border: 0; border-left: 4px solid #fff; border-right: 4px solid #fff; }
/* Paused, the button sits in the middle and grows, so a reduced-motion visitor sees how to start the video. */
[data-playing="false"] .showcase-toggle { right: calc(50% - 36px); bottom: calc(50% - 36px); width: 72px; height: 72px; }
[data-playing="false"] .showcase-toggle::before { margin-left: 5px; border-width: 13px 0 13px 21px; }

/* The big desktop pet, live, floating over a desktop with one window. */
.pets { background: var(--bg-2); }
.desk { position: relative; margin-top: 44px; height: 360px; border-radius: 20px; overflow: hidden; border: 1px solid var(--line); background: linear-gradient(165deg, #e8edf5 0%, #edf0f3 55%, #f3ede1 100%); }
.desk-win { position: absolute; left: 5%; top: 48px; bottom: -1px; width: 44%; border: 1px solid #dfe5ee; border-bottom: 0; border-radius: 12px 12px 0 0; background: #fff; box-shadow: 0 24px 50px -30px rgba(26, 42, 61, 0.35); }
.desk-win::before { content: ""; position: absolute; left: 14px; top: 13px; width: 46px; height: 10px; background: radial-gradient(circle at 5px 5px, #f0a29a 4px, transparent 4.5px), radial-gradient(circle at 23px 5px, #f3d08a 4px, transparent 4.5px), radial-gradient(circle at 41px 5px, #a9d9a4 4px, transparent 4.5px); }
.desk-win::after { content: ""; position: absolute; left: 24px; right: 24px; top: 48px; bottom: 0; background: repeating-linear-gradient(to bottom, #edf1f7 0 8px, transparent 8px 22px); -webkit-mask: linear-gradient(to right, #000 55%, transparent); mask: linear-gradient(to right, #000 55%, transparent); }
.desk-pet { position: absolute; inset: 0; }
.desk-pet > img { position: absolute; left: 62%; bottom: 4px; width: 324px; height: 223px; max-width: none; transform: translateX(-50%); pointer-events: none; }
.desk-pet > canvas { position: absolute; top: 0; left: 0; max-width: none; visibility: hidden; }
.desk-pet.is-live > img { visibility: hidden; }
.desk-pet.is-live > canvas { visibility: visible; }
/* Her speech bubble, as in the app: left of her head, its tail pointing at her. */
.pet-bubble { position: absolute; display: flex; max-width: 290px; flex-direction: column; align-items: center; gap: 1px; padding: 8px 14px; border-radius: 12px; background: #fff; box-shadow: 0 0 0 0.5px rgba(0, 0, 0, 0.08), 0 10px 26px -10px rgba(26, 42, 61, 0.45); color: var(--ink); font-size: 12.5px; line-height: 1.5; text-align: center; transform: translate(-100%, -50%); }
.pet-bubble[hidden] { display: none; }
.pet-bubble::after { content: ""; position: absolute; top: 50%; right: -6px; width: 12px; height: 12px; margin-top: -6px; background: #fff; box-shadow: 2px -2px 3px -2px rgba(26, 42, 61, 0.25); transform: rotate(45deg); }
.pet-bubble b { font-weight: 600; }
.pet-bubble span { color: var(--muted); }
.pet-toys { margin-top: 40px; grid-template-columns: repeat(4, 1fr); }
.pets .note { margin-top: 28px; font-size: 14px; }

.more { padding: 90px 0 110px; }
.more .points { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 1080px) {
  .quota-grid { grid-template-columns: 1fr 470px; gap: 40px; }
  .widget-frame { padding: 18px; }
  .widget { padding: 16px 18px 18px; }
  .w-rows { gap: 14px; }
  .more .points { grid-template-columns: repeat(2, 1fr); }
  .pet-toys { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .home-hero { min-height: 0; }
  .home-hero .hero-copy { padding-top: 104px; }
  .hero-stage { position: relative; inset: auto; height: 380px; margin-top: 8px; }
  .hero-stage .astr-star { left: 77%; top: 70px; width: 48px; height: 48px; margin: -24px 0 0 -24px; }
  .hero-stage .astr-star::before { inset: -60px; }
  .hero-stage .astr-star img { width: 32px; height: 32px; }
  .quota-grid { grid-template-columns: 1fr; gap: 24px; }
  .widget-wrap { max-width: 560px; }
}
@media (max-width: 640px) {
  .home-hero .hero-copy { padding-top: 104px; }
  .quota { padding-top: 8px; }
  .widget-frame { padding: 14px; border-radius: 20px; }
  .widget { padding: 16px; border-radius: 14px; }
  .w-rows { grid-template-columns: repeat(2, 1fr); gap: 18px 20px; }
  .w-pct { font-size: 24px; }
  .w-sub { font-size: 12px; }
  .office { margin-top: 24px; border-radius: 16px; }
  .desk { margin-top: 24px; height: 320px; border-radius: 16px; }
  .desk-win { display: none; }
  .desk-pet > img { width: 243px; height: 167px; bottom: 7px; }
  .pet-toys { margin-top: 32px; }
  .more { padding: 64px 0; }
}
@media (prefers-reduced-motion: reduce) {
  .office .bar i::after, .w-row.is-next { animation: none; }
  .failover { transition: none; }
}
