/* ============================================================================
   Shared primitives — the reset, document defaults and the button family.
   ============================================================================

   Loaded by both the tour (css/style.css) and the marketing site
   (css/site.css), after css/tokens.css. Anything here is used by both; if it
   belongs to only one of them it belongs in that stylesheet instead.
   ========================================================================== */

* { box-sizing: border-box; }

/* Several panels set display:flex/grid, which outranks the user-agent rule for
   [hidden] and would leave them permanently on screen. */
[hidden] { display: none !important; }

/* Present to a screen reader, absent to the eye. This is what the hidden
   labels and the page titles that have no visual slot want — `hidden` takes
   an element out of the accessibility tree as well as the layout, which for
   a <label> means the field it names has no accessible name at all. */
.vh {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
}

/* ------------------------------------------------------- immersive glow  */

/* The only thing section 11 adds that is not a recolour. Two very wide, very
   low-alpha fields sit behind everything, fixed to the viewport so they do
   not travel with a long page — the landing page is 3581px tall in the file
   and a glow that scrolled would band.

   It lives here rather than in a page, because the file's claim is that any
   screen can take this mode without being edited. `background-attachment:
   fixed` is ignored on iOS Safari, which falls back to scrolling with the
   page; that is a softer failure than the alternatives and the fields are
   subtle enough that it is hard to see.

   The gradients are painted on <body> and the glow tokens are only defined
   by .theme-immersive, so in the other two modes these resolve to nothing
   and the shorthand below falls back to a flat --bg. */
body.theme-immersive {
  background-color: var(--bg);
  background-image:
    radial-gradient(60% 46% at 18% 8%,  var(--glow-lilac) 0%, transparent 70%),
    radial-gradient(52% 40% at 88% 34%, var(--glow-teal)  0%, transparent 72%);
  background-attachment: fixed;
  background-repeat: no-repeat;
}

@media (prefers-reduced-motion: no-preference) {
  body.theme-immersive { transition: background-color 0.2s ease; }
}

/* --------------------------------------------------------------- buttons  */

.btn {
  font-family: inherit;
  font-size: var(--text-label-lg);
  font-weight: 600;
  color: var(--ink);
  background: var(--control);
  border: 1px solid var(--stroke);
  border-radius: var(--radius-pill);
  padding: 13px 30px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.18s ease, transform 0.18s ease, border-color 0.18s ease;
  -webkit-tap-highlight-color: transparent;
}

.btn:hover  { background: var(--control-hover); border-color: var(--stroke-strong); }
.btn:active { transform: scale(0.97); }

.btn:disabled {
  opacity: 0.45;
  cursor: default;
  pointer-events: none;
}

.btn--primary {
  background: var(--ink);
  color: var(--ink-inverse);
  border-color: transparent;
  padding: 15px 40px;
  font-size: 16px;
}
.btn--primary:hover { background: var(--ink-hover); }

/* The in-tour enquiry and the pricing CTA are the only amber buttons in the
   product — amber means "this is the one thing to do here". */
.btn--accent {
  background: var(--accent);
  color: var(--on-accent);
  border-color: transparent;
}
.btn--accent:hover { background: var(--accent-hover); }

/* Ghost pairs with a primary inside a panel: same metrics, no surface. */
.btn--ghost {
  background: transparent;
  border-color: transparent;
}
.btn--ghost:hover { background: var(--control); border-color: transparent; }

/* Panel-scale buttons. md is the default and clears the 44px touch target. */
.btn--md {
  height: var(--control-md);
  padding: 0 var(--space-lg);
  font-size: var(--text-label-lg);
}

.btn--sm {
  height: var(--control-sm);
  padding: 0 var(--space-sm);
  font-size: var(--text-label-md);
}

/* The marketing hero and CTA band sit a size above the panel controls. */
.btn--lg {
  height: 52px;
  padding: 0 28px;
  font-size: var(--text-label-lg);
}

/* Square, icon-only. The tour overrides this with its panel fill and blur. */
.btn--icon {
  width: 42px;
  height: 42px;
  padding: 0;
  font-size: var(--text-body-sm);
  letter-spacing: 0.02em;
}

.btn--block { width: 100%; }
.btn--grow  { flex: 1 1 0; min-width: 0; }

/* A quiet text-only action — "skip the walkthrough" and similar. */
.btn--plain {
  background: transparent;
  border-color: transparent;
  color: var(--ink-dim);
  padding: 10px 14px;
  font-size: var(--text-label-md);
}
.btn--plain:hover { background: var(--control); color: var(--ink); }

.btn:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}
