/* Balanik v2 — shared foundation. Tokens and primitives from design-system.md.
   Piece stylesheets build on this file; they must not redefine tokens or edit it. */

@font-face { font-family: "General Sans"; font-weight: 300; font-display: swap; src: url("../fonts/general-sans-300.woff2") format("woff2"); }
@font-face { font-family: "General Sans"; font-weight: 400; font-display: swap; src: url("../fonts/general-sans-400.woff2") format("woff2"); }
@font-face { font-family: "General Sans"; font-weight: 500; font-display: swap; src: url("../fonts/general-sans-500.woff2") format("woff2"); }
@font-face { font-family: "General Sans"; font-weight: 600; font-display: swap; src: url("../fonts/general-sans-600.woff2") format("woff2"); }

:root {
  /* colour — design-system.md §1 */
  --cloud: #F9F9FB;  --paper: #FFFFFF;  --mist: #EAEDF6;  --haze: #D1D6E1;
  --fog: #6C7693;    --storm: #3D3D5C;  --ink: #1F1F47;
  --violet: #5B55E8; --violet-press: #4A43D4; --violet-mist: #C9C7FA; --lilac: #EEEDFE;
  --mint: #B8F2D8;   --mint-ink: #0C6B4A;
  --coral: #FBDADA;  --coral-ink: #B3302F;
  --sun: #FFD964;    --sun-ink: #6B4A00;
  --night: #17173A;  --night-text: #B9BCE0;

  /* type — §2 (six page sizes) */
  --font: "General Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --t-hero: 76px;  --t-h2: 48px;  --t-num: 36px;  --t-h3: 22px;  --t-body: 17px;  --t-small: 13px;

  /* shape & space — §3 */
  --r-card: 16px; --r-panel: 32px; --r-screen: 12px; --r-pill: 9999px;
  --wrap: 1200px; --gutter: 24px; --section: 112px; --head-gap: 48px;
  --shadow-float: 0 4px 20px rgba(71, 92, 133, .22), 0 30px 60px rgba(144, 138, 208, .14);
  --shadow-soft: 0 3px 16px rgba(73, 46, 107, .14);

  /* motion — §5 */
  --ease: cubic-bezier(.2, .8, .2, 1);
  --ease-pop: cubic-bezier(.34, 1.56, .64, 1);
}
@media (max-width: 767px) {
  :root { --t-hero: 44px; --t-h2: 32px; --t-num: 36px; --gutter: 16px; --section: 72px; --head-gap: 32px; }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--cloud); color: var(--storm);
  font: 400 var(--t-body)/1.53 var(--font); -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img, svg, video { display: block; max-width: 100%; }
button { font: inherit; }
a { color: var(--violet); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--violet); outline-offset: 2px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* layout */
.im-wrap { max-width: calc(var(--wrap) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }
.im-section { padding: var(--section) 0; }

/* type roles */
.im-hero { font-size: var(--t-hero); line-height: 1; font-weight: 300; letter-spacing: -.045em; color: var(--ink); margin: 0; }
.im-h2 { font-size: var(--t-h2); line-height: 1.125; font-weight: 300; letter-spacing: -.03em; color: var(--ink); margin: 0; }
.im-h3 { font-size: var(--t-h3); line-height: 1.27; font-weight: 500; letter-spacing: -.01em; color: var(--ink); margin: 0; }
.im-num { font-size: var(--t-num); line-height: 1.1; font-weight: 500; letter-spacing: -.02em; color: var(--ink); font-variant-numeric: tabular-nums; }
.im-body { font-size: var(--t-body); line-height: 1.53; color: var(--storm); margin: 0; }
.im-small { font-size: var(--t-small); line-height: 1.38; font-weight: 500; letter-spacing: .01em; color: var(--fog); }
.im-eyebrow { font-size: var(--t-small); font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--violet); }
.im-tab { font-variant-numeric: tabular-nums; }

/* actions — §4: one filled pill per viewport, always with a ghost sibling */
.im-pill {
  display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 14px 26px;
  border-radius: var(--r-pill); background: var(--violet); color: #fff; border: 0;
  font: 500 var(--t-body)/1 var(--font); cursor: pointer; text-decoration: none;
  transition: background .25s var(--ease), transform .25s var(--ease);
}
/* the price in "Buy Balanik for $29" is its own span (it switches on 4 Nov); cancel the flex gap so it reads as one phrase */
.im-pill > [data-im-price] { margin-left: -4px; }
.im-pill:hover { background: var(--violet-press); transform: translateY(-1px); text-decoration: none; }
.im-pill:active { transform: scale(.98); }
.im-ghost { display: inline-flex; align-items: center; gap: 6px; font: 500 var(--t-body)/1 var(--font); color: var(--violet); }
.im-ghost::after { content: "›"; font-size: 1.2em; transition: transform .25s var(--ease); }
.im-ghost:hover::after { transform: translateX(3px); }
.im-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 20px 28px; }

/* chips, tags */
.im-chip { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 10px; border-radius: var(--r-pill); font: 500 13px/1 var(--font); font-variant-numeric: tabular-nums; white-space: nowrap; }
.im-chip--up { background: var(--mint); color: var(--mint-ink); }
.im-chip--down { background: var(--coral); color: var(--coral-ink); }
.im-chip--neutral { background: var(--lilac); color: var(--violet); }
.im-sample { display: inline-flex; align-items: center; height: 22px; padding: 0 10px; border-radius: var(--r-pill); background: var(--lilac); color: var(--violet); font: 500 13px/1 var(--font); letter-spacing: .01em; white-space: nowrap; }

/* surfaces */
.im-card { background: var(--paper); border: 1px solid var(--mist); border-radius: var(--r-card); padding: 32px; }
@media (max-width: 767px) { .im-card { padding: 24px; } }
.im-float { background: var(--paper); border-radius: var(--r-card); box-shadow: var(--shadow-float); }
.im-panel { border-radius: var(--r-panel); overflow: hidden; }
.im-badge { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--lilac); color: var(--violet); flex: none; }
.im-badge--mint { background: var(--mint); color: var(--mint-ink); }
.im-badge--coral { background: var(--coral); color: var(--coral-ink); }
.im-badge svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }

/* device frames — hand-built, §4. The screen content is the redesigned plugin UI. */
.im-laptop { position: relative; }
.im-laptop__lid { background: var(--ink); border-radius: 14px 14px 6px 6px; padding: 12px 12px 14px; box-shadow: var(--shadow-float); }
.im-laptop__screen { border-radius: 6px; overflow: hidden; background: var(--cloud); aspect-ratio: 16 / 10; position: relative; }
.im-laptop__base { height: 14px; margin: 0 -6%; background: linear-gradient(#d9dce8, #c3c7d6); border-radius: 0 0 14px 14px; position: relative; }
.im-laptop__base::before { content: ""; position: absolute; left: 50%; top: 0; width: 16%; height: 6px; transform: translateX(-50%); background: #b3b7c8; border-radius: 0 0 8px 8px; }
.im-phone { width: 300px; max-width: 100%; background: var(--ink); border-radius: 44px; padding: 12px; box-shadow: var(--shadow-float); position: relative; }
.im-phone__screen { border-radius: 33px; overflow: hidden; background: var(--cloud); aspect-ratio: 9 / 19.5; position: relative; }
.im-phone__island { position: absolute; top: 22px; left: 50%; width: 86px; height: 24px; transform: translateX(-50%); background: var(--ink); border-radius: var(--r-pill); z-index: 2; }
.im-monitor__frame { background: var(--ink); border-radius: 18px; padding: 14px; box-shadow: var(--shadow-float); }
.im-monitor__screen { border-radius: 8px; overflow: hidden; background: var(--cloud); aspect-ratio: 16 / 9; position: relative; }
.im-monitor__stand { width: 18%; height: 44px; margin: 0 auto; background: linear-gradient(#c9ccda, #b6bacb); clip-path: polygon(22% 0, 78% 0, 100% 100%, 0 100%); }
.im-monitor__foot { width: 30%; height: 10px; margin: 0 auto; background: #b6bacb; border-radius: 10px; }

/* reveal on scroll (base.js adds .is-in) */
.im-reveal { opacity: 0; transform: translateY(16px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.im-reveal.is-in { opacity: 1; transform: none; }
.no-js .im-reveal { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .im-reveal { opacity: 1; transform: none; }
}

/* reassurance next to a buy button: 14-day refund, no subscription (mint checks, as on the pg-checks lists) */
.im-assure { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 18px 0 0; padding: 0; font: 500 var(--t-small)/1.3 var(--font); letter-spacing: .01em; color: var(--storm); }
.im-assure li { position: relative; margin: 0; padding-left: 26px; }
.im-assure li::before { content: ""; position: absolute; left: 0; top: 50%; width: 18px; height: 18px; margin-top: -9px; border-radius: 50%; background: var(--mint); }
.im-assure li::after { content: ""; position: absolute; left: 6.5px; top: 50%; width: 4px; height: 8px; margin-top: -6px; border-right: 2px solid var(--mint-ink); border-bottom: 2px solid var(--mint-ink); transform: rotate(45deg); }
