/* The tour video: the first-visit popup and the homepage's tour section.
   Drawn in the sketch theme - parchment card, ink outline, a pencil shadow. */

html.tour-open { overflow: hidden; }

.tour-pop {
  position: fixed; inset: 0; z-index: 1000;
  display: grid; place-items: center; padding: 16px;
  background: rgba(30, 22, 14, .62);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  opacity: 0; transition: opacity .25s ease;
}
.tour-pop.is-in { opacity: 1; }

.tour-card {
  position: relative;
  /* A phone-shaped video, as tall as the screen allows. */
  width: min(420px, calc((100vh - 120px) * 9 / 16), calc(100vw - 32px));
  padding: 14px 14px 16px;
  background: #fbf7f0;
  border: 1px solid #3a2c1e;
  border-radius: 28px;
  box-shadow: 0 4px 14px -10px rgba(42, 32, 22, 0.24), 0 30px 80px rgba(0, 0, 0, .45);
  transform: translateY(24px) scale(.96);
  transition: transform .35s cubic-bezier(.2, .9, .3, 1.2);
}
.tour-pop.is-in .tour-card { transform: none; }

.tour-badge {
  margin: 2px 0 10px; text-align: center;
  font-family: "Sora", sans-serif; font-weight: 700; font-size: 12px; letter-spacing: .22em;
  color: #8e3a1c;
}

.tour-stage {
  position: relative; aspect-ratio: 9 / 16; border-radius: 18px; overflow: hidden;
  background: #e8d9ba; border: 1px solid #3a2c1e;
}
.tour-stage video { width: 100%; height: 100%; object-fit: cover; display: block; cursor: pointer; }

.tour-sound {
  position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%);
  padding: 11px 20px; border-radius: 999px; border: 1px solid #3a2c1e; cursor: pointer;
  background: #8e3a1c; color: #fff; font: 700 15px "Sora", sans-serif; white-space: nowrap;
  box-shadow: 0 4px 14px -10px rgba(42, 32, 22, 0.24);
  animation: tour-nudge 1.6s ease-in-out infinite;
}
.tour-sound.is-on { background: rgba(251, 247, 240, .92); color: #2a2016; animation: none; }
@keyframes tour-nudge { 0%, 100% { transform: translateX(-50%) scale(1); } 50% { transform: translateX(-50%) scale(1.06); } }

.tour-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 5px; background: rgba(42, 32, 22, .18); }
.tour-bar-fill {
  display: block; height: 100%; background: #8e3a1c; transform-origin: 0 50%; transform: scaleX(0);
  transition: transform .25s linear;
}

.tour-end {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: flex-end;
  gap: 12px; padding: 0 24px 70px; background: linear-gradient(transparent 45%, rgba(251, 247, 240, .92));
}
.tour-end[hidden] { display: none; }
.tour-end .tour-cta { width: auto; padding: 14px 30px; font-size: 17px; }
.tour-again {
  border: 0; background: none; cursor: pointer; font: 700 15px "Sora", sans-serif; color: #2a2016;
  text-decoration: underline wavy #8e3a1c; text-underline-offset: 5px;
}

.tour-close {
  position: absolute; top: -14px; right: -14px; width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center; cursor: pointer;
  background: #fbf7f0; border: 1px solid #3a2c1e; box-shadow: 0 4px 14px -10px rgba(42, 32, 22, 0.24);
}
.tour-close svg { width: 20px; height: 20px; fill: none; stroke: #2a2016; stroke-width: 2.6; stroke-linecap: round; }
.tour-close:hover { background: #f3ece0; }
.tour-close:focus-visible, .tour-sound:focus-visible, .tour-again:focus-visible { outline: 3px solid #8e3a1c; outline-offset: 3px; }

/* ── The homepage section ── */
.tour {
  display: grid; justify-items: center; gap: 14px;
  width: min(1080px, calc(100% - 32px)); margin: 0 auto; text-align: center;
}
.tour-frame {
  width: min(360px, 100%); padding: 12px; margin-top: 8px;
  background: #fbf7f0; border: 1px solid #3a2c1e; border-radius: 26px;
  box-shadow: 0 4px 14px -10px rgba(42, 32, 22, 0.24); transform: none;
}
.tour-frame video {
  width: 100%; aspect-ratio: 9 / 16; display: block; border-radius: 16px; border: 1px solid #3a2c1e;
  background: #e8d9ba;
}

@media (prefers-reduced-motion: reduce) {
  .tour-pop, .tour-card, .tour-bar-fill { transition: none; }
  .tour-sound { animation: none; }
}

.tour-sound[hidden] { display: none; }

/* ── "Now on Mac": the one-time announcement (announce.js) ─────────────────
   The tour's overlay and close button, with a paper card of its own. */
.news-card {
  position: relative;
  width: min(460px, calc(100vw - 32px));
  max-height: calc(100vh - 40px);
  overflow-x: hidden;
  overflow-y: auto;
  padding: 26px 24px 22px;
  background: linear-gradient(180deg, rgba(255, 252, 244, .7), rgba(255, 252, 244, 0) 40%), #fbf7f0;
  border: 1px solid #3a2c1e;
  border-radius: 14px;
  box-shadow: 0 4px 14px -10px rgba(42, 32, 22, 0.24), 0 30px 80px rgba(0, 0, 0, .45);
  text-align: center;
  color: #2a2016;
  transform: translateY(24px) scale(.96);
  transition: transform .35s cubic-bezier(.2, .9, .3, 1.2);
}
.news-pop.is-in .news-card { transform: none; }

.news-badge {
  display: inline-block; margin: 0 0 8px; padding: 5px 14px; border-radius: 999px;
  background: #8e3a1c; color: #fcf9f3;
  font: 800 12px "Sora", sans-serif; letter-spacing: .16em;
}
.news-title {
  margin: 0; font: 900 40px/1.05 "Orbitron", "Sora", sans-serif; letter-spacing: .02em; text-transform: uppercase;
  color: var(--graphite);
  background-image: none;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-stroke: 0;
}
.news-sub { margin: 8px 0 16px; font-size: 16px; line-height: 1.45; }

.news-laptop { width: 86%; margin: 0 auto 16px; }
.news-lid {
  padding: 8px 8px 10px; border: 1px solid #2a1b10; border-radius: 12px 12px 5px 5px;
  background: #2b2622; box-shadow: 0 4px 14px -10px rgba(42, 32, 22, 0.24);
}
.news-screen { display: block; width: 100%; aspect-ratio: 900 / 600; object-fit: cover; object-position: top; border-radius: 3px; }
.news-base {
  width: 112%; height: 11px; margin-left: -6%;
  border: 1px solid #2a1b10; border-top: 0; border-radius: 0 0 12px 12px;
  background: linear-gradient(#d9d4cb, #b9b3a8);
}

.news-points {
  margin: 0 0 18px; padding: 0; list-style: none; display: grid; gap: 7px; text-align: left;
  font-size: 14.5px; line-height: 1.4;
}
.news-points li {
  padding: 8px 12px; border: 1px solid rgba(42, 32, 22, .3); border-radius: 14px;
  background: rgba(255, 253, 248, .85);
}
.news-points strong { color: #8e3a1c; }

.news-actions { display: grid; gap: 8px; justify-items: center; }
.news-actions .news-go { width: 100%; padding: 14px 20px; font-size: 16px; text-align: center; }
.news-later {
  border: 0; background: none; cursor: pointer; font: 700 14px "Sora", sans-serif; color: #5a4630;
  text-decoration: underline; text-underline-offset: 4px;
}
.news-later:focus-visible, .news-go:focus-visible { outline: 3px solid #8e3a1c; outline-offset: 3px; }
/* The card scrolls on short screens, so its close button sits inside the corner. */
.news-card .tour-close { top: 10px; right: 10px; width: 38px; height: 38px; }

/* ── "Someone just bought": real recent activations (activations.js) ───────
   Every figure on the card comes from public.recent_activations(), so this is
   a status line and not a dialog: it never takes focus and never covers the
   page. It therefore sits under the tour and the Mac announcement, which are
   modal, rather than competing with them for the screen. */
.act-card {
  position: fixed; left: 22px; bottom: 22px; z-index: 900;
  display: flex; align-items: flex-start; gap: 12px;
  max-width: min(360px, calc(100vw - 44px));
  padding: 14px 44px 14px 16px;
  background: #fbf7f0;
  border: 1px solid #3a2c1e;
  border-radius: 18px;
  box-shadow: 0 4px 14px -10px rgba(42, 32, 22, 0.24);
  font-family: "Sora", sans-serif;
  opacity: 0; transform: translateY(16px);
  transition: opacity .3s ease, transform .3s ease;
}
.act-card.is-in { opacity: 1; transform: none; }

/* The green dot reads as "live" without claiming a moment that is not now. */
.act-dot {
  flex: none; width: 10px; height: 10px; margin-top: 6px;
  border-radius: 50%; background: #2f7d5b;
  box-shadow: 0 0 0 4px rgba(47, 125, 91, .18);
}

.act-body { min-width: 0; }
.act-plan { margin: 0; font-weight: 800; font-size: 16px; color: #231c15; }
.act-when { margin: 3px 0 0; font-size: 14px; color: #6b5c49; }

.act-close {
  position: absolute; top: 8px; right: 8px;
  width: 30px; height: 30px; display: grid; place-items: center;
  border: 0; background: none; cursor: pointer; border-radius: 8px; color: #8a7a65;
}
.act-close svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }
.act-close:hover { color: #3a2c1e; background: rgba(58, 44, 30, .07); }
.act-close:focus-visible { outline: 3px solid #8e3a1c; outline-offset: 2px; }

/* On a phone the card spans the width, where a corner would be too small to read. */
@media (max-width: 560px) {
  .act-card { left: 12px; right: 12px; bottom: 12px; max-width: none; }
}

@media (prefers-reduced-motion: reduce) {
  .act-card { transition: none; transform: none; }
}

/* ── Temporarily paused new-signup models in the plan model list ─────────
   The names stay visible for existing customers, but a new signup can see
   which rows will be absent until the funding pause is lifted. */
.model-paused {
  margin-left: auto;
  padding: 2px 7px;
  border: 1px solid rgba(142, 58, 28, 0.35);
  border-radius: 999px;
  background: rgba(142, 58, 28, 0.08);
  color: #8e3a1c;
  font-size: 11px;
  line-height: 1.3;
  white-space: nowrap;
}

.model-row.is-paused .model-maker {
  margin-left: 8px;
}

@media (max-width: 560px) {
  .model-paused {
    margin-left: auto;
    padding: 2px 5px;
    font-size: 10px;
  }
}
