/* =====================================================================
   Sentrix scroll story · styles
   Everything is scoped to .sx (every section in this package carries it),
   so nothing here touches the host site's own elements.
   Brand: Sentrix Oct 25 palette (dark only). See README.md.
   ===================================================================== */

.sx {
  /* brand tokens */
  --sx-obsidian: #0E0E10;   /* ground */
  --sx-parch: #ECE6DA;      /* text and marks */
  --sx-accent: #F59B31;     /* orange accent: buttons, highlights (< 10% of any screen) */
  --sx-accent-hover: #FFAA48;
  --sx-navy: #14213D;       /* Deep Navy: trust and privacy moments */
  --sx-graphite: #2A2A2E;   /* cards on Obsidian */
  --sx-stone: #8A857C;      /* secondary text */
  --sx-oxblood: #7A4A3F;    /* alerts and danger only */
  --sx-ox: #C99A8E;         /* Oxblood text tint, for legibility on dark */
  --sx-hairline: rgba(236, 230, 218, .12);

  /* integration knobs */
  --sx-font: "Inter", system-ui, -apple-system, "Helvetica Neue", sans-serif;
  --sx-canvas-font: "Inter", system-ui, -apple-system, "Helvetica Neue", sans-serif; /* read once by the script for canvas text */
  --sx-header-h: 60px;      /* height of the host site's fixed/sticky header over the story; 0px if none */
  --sx-max: 1180px;         /* content width of the sections after the story */
  --sx-gl: max(16px, env(safe-area-inset-left));
  --sx-gr: max(16px, env(safe-area-inset-right));

  color-scheme: dark;
  background: var(--sx-obsidian);
  color: var(--sx-parch);
  font-family: var(--sx-font);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
.sx *, .sx *::before, .sx *::after { box-sizing: border-box; }
.sx a { color: inherit; }
.sx :focus-visible { outline: 2px solid var(--sx-accent); outline-offset: 3px; border-radius: 6px; }
.sx .sx-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.sx .sx-accent { color: var(--sx-accent); }
.sx .sx-eyebrow { margin: 0; color: var(--sx-accent); font-size: 14px; font-weight: 600; letter-spacing: .01em; }

/* buttons */
.sx .sx-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; cursor: pointer;
  background: var(--sx-accent); color: var(--sx-obsidian); font: 600 16px/1 var(--sx-font); letter-spacing: -.01em;
  text-decoration: none; border-radius: 999px; padding: 15px 24px; }
.sx .sx-btn:hover { background: var(--sx-accent-hover); }
.sx .sx-btn--small { font-size: 14px; padding: 10px 16px; }
.sx .sx-btn--ghost { background: transparent; color: var(--sx-parch); box-shadow: inset 0 0 0 1px rgba(236, 230, 218, .3); }
.sx .sx-btn--ghost:hover { background: rgba(236, 230, 218, .07); }

/* ---------- the scroll story ---------- */
.sx-story { position: relative; }                                  /* the script sets its height */
.sx-story .sx-anchors > span { position: absolute; left: 0; width: 1px; height: 1px; }
.sx-story .sx-skip { position: absolute; z-index: 5; left: max(16px, env(safe-area-inset-left)); top: calc(var(--sx-header-h) + 8px);
  padding: 10px 16px; border-radius: 999px; background: var(--sx-graphite); color: var(--sx-parch); font-size: 14px; font-weight: 600; text-decoration: none;
  transform: translateY(-300%); opacity: 0; }
.sx-story .sx-skip:focus { transform: none; opacity: 1; }
.sx-story .sx-stage { position: sticky; top: 0; height: 100svh; overflow: hidden; max-width: 1440px; margin: 0 auto;
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: clamp(24px, 4vw, 72px);
  padding: var(--sx-header-h) max(32px, env(safe-area-inset-right)) 0 max(32px, env(safe-area-inset-left)); }
.sx-story .sx-film { position: relative; grid-column: 2; grid-row: 1; justify-self: end;
  height: min(calc(100svh - var(--sx-header-h) - 16px), 980px); aspect-ratio: 3 / 4;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent), linear-gradient(to bottom, transparent, #000 7%, #000 91%, transparent);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent), linear-gradient(to bottom, transparent, #000 7%, #000 91%, transparent);
  mask-composite: intersect; }
.sx-story .sx-poster, .sx-story .sx-canvas { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }
.sx-story .sx-poster { object-fit: cover; transition: opacity .4s; }
.sx-story.sx-live .sx-poster { opacity: 0; }                       /* hidden once the canvas has drawn */
.sx-story .sx-narr { position: relative; grid-column: 1; grid-row: 1; justify-self: end; width: 100%; max-width: 35rem; }
.sx-story .sx-chap-num { font-variant-numeric: tabular-nums; margin-right: .7em; opacity: .7; }
.sx-story .sx-lines { position: relative; margin-top: 22px; font-size: clamp(26px, 2.3vw, 38px); min-height: 7.2em; }
.sx-story .sx-line { position: absolute; inset: 0 0 auto 0; margin: 0; font-weight: 600; line-height: 1.17; letter-spacing: -.024em;
  opacity: 0; visibility: hidden; }
.sx-story .sx-line:first-child { opacity: 1; visibility: visible; }
.sx-story .sx-srcs { position: relative; margin-top: 8px; }
.sx-story .sx-src { position: absolute; inset: 0 0 auto 0; margin: 0; max-width: 31rem; font-size: 13px; line-height: 1.5; color: var(--sx-stone);
  opacity: 0; visibility: hidden; }
.sx-story .sx-src a { color: var(--sx-stone); text-underline-offset: 2px; margin-left: .3em; }
.sx-story .sx-end { position: absolute; inset: 0 0 auto 0; opacity: 0; visibility: hidden; }
.sx-story .sx-wordmark { margin: 0; font-size: clamp(64px, 7.2vw, 116px); font-weight: 650; letter-spacing: -.045em; line-height: .95; }
.sx-story .sx-tag { margin: .35em 0 0; font-size: clamp(26px, 2.5vw, 40px); font-weight: 600; letter-spacing: -.024em; line-height: 1.15; }
.sx-story .sx-ctas { margin-top: 36px; display: flex; flex-wrap: wrap; gap: 12px; }

/* full-screen statement cards */
.sx-story .sx-card { position: absolute; inset: 0; margin: 0; display: grid; place-items: center; align-content: center; text-align: center;
  padding: var(--sx-header-h) 24px 0; font-weight: 650; letter-spacing: -.04em; line-height: 1.02; font-size: clamp(48px, 7.4vw, 124px);
  opacity: 0; visibility: hidden; pointer-events: none; }
.sx-story .sx-card .sx-hot { color: var(--sx-ox); }                  /* the problem: Oxblood */
.sx-story .sx-card .sx-win { color: var(--sx-accent); }              /* the turn to Sentrix: orange */
.sx-story .sx-card::before { content: ""; position: absolute; left: 50%; top: 52%; width: min(90vw, 900px); aspect-ratio: 1; transform: translate(-50%, -50%);
  background: radial-gradient(closest-side, rgba(122, 74, 63, .32), rgba(122, 74, 63, .08) 55%, transparent); z-index: -1; pointer-events: none; }
.sx-story .sx-card--win::before { background: radial-gradient(closest-side, rgba(245, 155, 49, .16), rgba(245, 155, 49, .04) 55%, transparent); }

.sx-story .sx-cue { position: absolute; left: 50%; bottom: max(18px, env(safe-area-inset-bottom)); transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 6px; pointer-events: none;
  font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--sx-stone); }
.sx-story .sx-cue svg { animation: sx-bob 1.8s ease-in-out infinite; }
@keyframes sx-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(5px); } }
@media (prefers-reduced-motion: reduce) { .sx-story .sx-cue svg { animation: none; } }

/* ---------- sections after the story ---------- */
.sx-section { padding: clamp(96px, 13vw, 168px) 0 0; }
.sx-section > .sx-wrap { max-width: var(--sx-max); margin: 0 auto; padding: 0 var(--sx-gr) 0 var(--sx-gl); }
.sx-section h2 { margin: 0; font-size: clamp(38px, 5.2vw, 72px); font-weight: 650; letter-spacing: -.04em; line-height: 1.03; }
.sx-section .sx-eyebrow + h2 { margin-top: 14px; }
.sx-section .sx-lede { margin: 22px 0 0; max-width: 36rem; font-size: clamp(17px, 1.4vw, 20px); line-height: 1.5; color: var(--sx-stone); }

/* what it does: three cards */
.sx-features .sx-cards { margin-top: 56px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.sx-features .sx-feature { margin: 0; background: linear-gradient(180deg, #2A2A2E, #202024); border-radius: 28px; overflow: hidden; box-shadow: inset 0 0 0 1px var(--sx-hairline); }
.sx-features .sx-shot { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; background: radial-gradient(120% 90% at 30% 25%, #3A3F55, #1A1C26 55%, #0E0E10); }
.sx-features .sx-feature-body { padding: 24px 26px 30px; }
.sx-features h3 { margin: 0; font-size: 14px; font-weight: 600; color: var(--sx-accent); letter-spacing: .01em; }
.sx-features .sx-feature-lead { margin: 10px 0 0; font-size: 22px; font-weight: 600; letter-spacing: -.02em; line-height: 1.22; }
.sx-features .sx-feature-fine { margin: 12px 0 0; font-size: 15px; line-height: 1.5; color: var(--sx-stone); }

/* the details: Deep Navy band */
.sx-details .sx-band { border-radius: 36px; padding: clamp(48px, 7vw, 96px) clamp(24px, 6vw, 88px);
  background: linear-gradient(135deg, #14213D, #0E0E10); box-shadow: inset 0 0 0 1px var(--sx-hairline); }
.sx-details h2 { font-size: clamp(34px, 4.6vw, 64px); }
.sx-details .sx-rows { margin-top: 48px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px 64px; }
.sx-details h3 { margin: 0 0 10px; font-size: 14px; font-weight: 600; color: var(--sx-accent); letter-spacing: .01em; }
.sx-details .sx-row p { margin: 0; font-size: 17px; line-height: 1.62; color: rgba(236, 230, 218, .84); }
.sx-details sup { font-size: .65em; color: var(--sx-stone); margin-left: 1px; }
.sx-details .sx-notes { margin: 48px 0 0; padding: 24px 0 0 1.2em; border-top: 1px solid var(--sx-hairline); font-size: 13px; line-height: 1.55; color: var(--sx-stone); }
.sx-details .sx-notes li + li { margin-top: 8px; }
.sx-details .sx-notes a { color: var(--sx-stone); text-underline-offset: 2px; }

/* plans */
.sx-plans .sx-plan-grid { margin-top: 48px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.sx-plans .sx-plan { position: relative; margin: 0; border-radius: 24px; padding: 28px 26px 30px; background: #1A1A1D; box-shadow: inset 0 0 0 1px var(--sx-hairline); }
.sx-plans .sx-plan--rec { box-shadow: inset 0 0 0 1.5px rgba(245, 155, 49, .75); background: linear-gradient(180deg, #2A2A2E, #1E1E21); }
.sx-plans h3 { margin: 0; font-size: 22px; font-weight: 600; letter-spacing: -.02em; }
.sx-plans .sx-plan p { margin: 10px 0 0; font-size: 16px; line-height: 1.5; color: var(--sx-stone); }
.sx-plans .sx-pill { display: inline-block; margin-bottom: 14px; padding: 5px 11px; border-radius: 999px; font-size: 12px; font-weight: 600;
  color: var(--sx-accent); box-shadow: inset 0 0 0 1px rgba(245, 155, 49, .55); }
.sx-plans .sx-note { margin: 22px 0 0; font-size: 14px; color: var(--sx-stone); }

/* get updates */
.sx-updates { text-align: center; padding-bottom: clamp(96px, 12vw, 150px); }
.sx-updates .sx-lede { margin-inline: auto; }
.sx-updates form { margin: 34px auto 0; display: flex; gap: 10px; max-width: 30rem; }
.sx-updates input[type=email] { flex: 1; min-width: 0; height: 52px; padding: 0 22px; border: 0; border-radius: 999px;
  background: var(--sx-graphite); color: var(--sx-parch); font: 500 16px var(--sx-font); box-shadow: inset 0 0 0 1px var(--sx-hairline); }
.sx-updates input[type=email]::placeholder { color: var(--sx-stone); }
.sx-updates .sx-btn { height: 52px; padding: 0 22px; white-space: nowrap; }
.sx-updates .sx-status { min-height: 1.5em; margin: 16px 0 0; font-size: 15px; color: var(--sx-stone); }

/* ---------- phones and narrow windows ---------- */
@media (max-width: 860px) {
  .sx-story .sx-stage { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; align-items: start; justify-items: center;
    row-gap: 6px; padding: var(--sx-header-h) var(--sx-gr) 0 var(--sx-gl); }
  .sx-story .sx-film { grid-column: 1; grid-row: 1; justify-self: center; height: auto; width: min(100%, calc((100svh - var(--sx-header-h) - 200px) * .75)); }
  .sx-story .sx-narr { grid-column: 1; grid-row: 2; justify-self: stretch; max-width: none; }
  .sx-story .sx-lines { font-size: clamp(20px, 5.5vw, 26px); min-height: 4.6em; margin-top: 10px; }
  .sx-story .sx-src { font-size: 12px; }
  .sx-story .sx-wordmark { font-size: clamp(52px, 15vw, 72px); }
  .sx-story .sx-tag { font-size: clamp(22px, 6vw, 28px); }
  .sx-story .sx-ctas { margin-top: 22px; }
  .sx-story .sx-card { font-size: clamp(40px, 11.5vw, 64px); }
  .sx-features .sx-cards, .sx-plans .sx-plan-grid, .sx-details .sx-rows { grid-template-columns: minmax(0, 1fr); }
  .sx-features .sx-cards { margin-top: 40px; }
  .sx-features .sx-feature-lead { font-size: 20px; }
  .sx-details .sx-rows { gap: 28px; margin-top: 36px; }
  .sx-details .sx-row p { font-size: 16px; }
  .sx-updates form { flex-direction: column; }
  .sx-updates input[type=email] { flex: none; width: 100%; }
  .sx-updates .sx-btn { width: 100%; }
}
@media (max-width: 860px) and (max-height: 700px) {
  .sx-story .sx-lines { font-size: 19px; }
  .sx-story .sx-film { width: min(100%, calc((100svh - var(--sx-header-h) - 176px) * .75)); }
}

/* ---------- demo page only (index.html): a stand-in for the host site's header and footer ---------- */
.sx-demo-nav { position: fixed; inset: 0 0 auto 0; z-index: 20; height: 60px; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 0 max(24px, env(safe-area-inset-right)) 0 max(24px, env(safe-area-inset-left));
  background: linear-gradient(rgba(14, 14, 16, .94), rgba(14, 14, 16, .72) 65%, rgba(14, 14, 16, 0)); }
.sx-demo-nav .sx-brand { font-weight: 650; font-size: 20px; letter-spacing: -.025em; text-decoration: none; color: var(--sx-parch); }
.sx-demo-nav nav { display: flex; gap: clamp(14px, 2.4vw, 32px); }
.sx-demo-nav nav a { color: var(--sx-stone); text-decoration: none; font-size: 14px; font-weight: 500; transition: color .3s; }
.sx-demo-nav nav a:hover, .sx-demo-nav nav a.is-active { color: var(--sx-parch); }
.sx-demo-footer { max-width: var(--sx-max); margin: 0 auto; padding: 28px var(--sx-gr) max(36px, env(safe-area-inset-bottom)) var(--sx-gl);
  border-top: 1px solid var(--sx-hairline); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px; font-size: 13px; color: var(--sx-stone); }
@media (max-width: 860px) { .sx-demo-nav { padding: 0 var(--sx-gr) 0 var(--sx-gl); } .sx-demo-nav nav { display: none; } }
