/* /events/sozdat-i-prodat-franshizu — bespoke dark design system.
   Standalone page (own <!DOCTYPE>, own header) — deliberately NOT the shared
   paper/lime site theme. Mobile-first; 12-col invisible grid; spacing in
   multiples of 8px; left-aligned typography throughout (F/Z reading pattern —
   only short standalone accent lines are centered). */

.fr-page {
  --bg: #0A0A0A;
  --bg-2: #111214;
  --text: #FAFAFA;
  --muted: rgba(250, 250, 250, .64);
  --muted-2: rgba(250, 250, 250, .44);
  --accent: #00E5A0;
  --accent-ink: #04140E;
  --border: rgba(250, 250, 250, .12);
  --border-2: rgba(250, 250, 250, .20);
  --surface: rgba(250, 250, 250, .04);
  --surface-2: rgba(250, 250, 250, .07);

  --sp-1: 8px; --sp-2: 16px; --sp-3: 24px; --sp-4: 32px;
  --sp-5: 40px; --sp-6: 48px; --sp-8: 64px; --sp-10: 80px; --sp-12: 96px; --sp-16: 128px;

  --f-head: 'Inter Tight', system-ui, -apple-system, sans-serif;
  --f-body: 'Manrope', system-ui, -apple-system, sans-serif;

  background: var(--bg);
  color: var(--text);
  font-family: var(--f-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
.fr-page * { box-sizing: border-box; }
.fr-page h1, .fr-page h2, .fr-page h3 {
  font-family: var(--f-head);
  color: var(--text);
  line-height: 1.08;
  letter-spacing: -0.01em;
  margin: 0;
  text-wrap: balance;
  hyphens: manual;
}
.fr-page p { margin: 0; color: var(--muted); line-height: 1.55; }
.fr-page ul { margin: 0; padding: 0; list-style: none; }
.fr-page a { color: inherit; text-decoration: none; }
.fr-page .mono { font-family: 'JetBrains Mono', ui-monospace, monospace; letter-spacing: .02em; }
.fr-page .fr-accent { color: var(--accent); }

.fr-wrap { max-width: 1200px; margin: 0 auto; padding: 0 var(--sp-3); }

.fr-sec { position: relative; padding: var(--sp-10) 0; overflow: hidden; }
.fr-sec + .fr-sec { border-top: 1px solid var(--border); }

.fr-eyebrow { color: var(--muted-2); font-size: .8rem; text-transform: uppercase; margin-bottom: var(--sp-2); }
.fr-h1 { font-size: clamp(2rem, 5.6vw, 4.2rem); font-weight: 800; max-width: 16ch; }
.fr-h2 { font-size: clamp(1.5rem, 3.6vw, 2.4rem); font-weight: 700; max-width: 22ch; margin-bottom: var(--sp-4); }

/* ── buttons (incl. magnetic wrapper) ─────────────────────────────────── */
.fr-btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: var(--sp-1); padding: 14px 28px; border-radius: 999px;
  background: var(--accent); color: var(--accent-ink);
  font-family: var(--f-head); font-weight: 700; font-size: .95rem;
  border: none; cursor: pointer; white-space: nowrap;
  transition: transform .18s cubic-bezier(.2,.8,.2,1), box-shadow .18s ease;
}
.fr-btn:hover { box-shadow: 0 0 0 6px rgba(0,229,160,.14); }
.fr-btn-lg { padding: 18px 36px; font-size: 1.05rem; }
.fr-btn-sm { padding: 10px 20px; font-size: .85rem; }
.fr-btn-block { width: 100%; }
.fr-btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--border-2); }
.fr-btn-ghost:hover { box-shadow: none; border-color: var(--accent); }
.fr-magnetic { will-change: transform; }

/* ── header ────────────────────────────────────────────────────────────── */
.fr-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(10,10,10,.72); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.fr-header-in {
  max-width: 1200px; margin: 0 auto; padding: var(--sp-2) var(--sp-3);
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2);
}
.fr-logo { font-family: var(--f-head); font-weight: 600; font-size: .95rem; color: var(--text); }
.fr-logo b { font-weight: 800; }
.fr-nav-desktop { display: none; align-items: center; gap: var(--sp-4); }
.fr-nav-desktop a:not(.fr-btn) { color: var(--muted); font-size: .9rem; }
.fr-nav-desktop a:not(.fr-btn):hover { color: var(--text); }

.fr-burger {
  display: flex; flex-direction: column; justify-content: center; gap: 5px;
  width: 40px; height: 40px; background: none; border: 1px solid var(--border-2);
  border-radius: 10px; cursor: pointer; padding: 0 9px;
}
.fr-burger span { display: block; height: 2px; width: 100%; background: var(--text); border-radius: 2px; transition: transform .2s ease, opacity .2s ease; }
.fr-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.fr-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.fr-burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.fr-nav-mobile {
  display: flex; flex-direction: column; gap: var(--sp-2);
  padding: var(--sp-2) var(--sp-3) var(--sp-3); border-top: 1px solid var(--border);
}
.fr-nav-mobile a:not(.fr-btn) { padding: var(--sp-1) 0; color: var(--muted); font-size: 1rem; }
.fr-nav-mobile[hidden] { display: none; }

@media (min-width: 860px) {
  .fr-nav-desktop { display: flex; }
  .fr-burger { display: none; }
  .fr-nav-mobile { display: none !important; }
}

/* ── hero ──────────────────────────────────────────────────────────────── */
.fr-hero { padding: var(--sp-12) 0 var(--sp-10); position: relative; overflow: hidden; }
.fr-hero-bg {
  position: absolute; inset: -20% -10% -10% -10%; z-index: 0; pointer-events: none;
  background:
    radial-gradient(60% 50% at 82% 8%, rgba(0,229,160,.16), transparent 60%),
    radial-gradient(45% 40% at 8% 90%, rgba(0,229,160,.08), transparent 65%);
}
.fr-hero-in { position: relative; z-index: 1; }
.fr-jit { max-width: 46ch; margin-top: var(--sp-3); font-size: .95rem; color: var(--muted); border-left: 2px solid var(--accent); padding-left: var(--sp-2); }
.fr-sub { max-width: 42ch; margin-top: var(--sp-3); font-size: 1.1rem; color: var(--muted); }
.fr-hero .fr-btn { margin-top: var(--sp-5); }
.fr-trust { margin-top: var(--sp-3); color: var(--muted-2); font-size: .8rem; max-width: 40ch; }

/* ── bento grid ────────────────────────────────────────────────────────── */
.fr-bento { display: grid; grid-template-columns: 1fr; gap: var(--sp-2); }
.fr-bento-cell {
  background: var(--surface); border: 1px solid var(--border); border-radius: 20px;
  padding: var(--sp-4);
}
.fr-bento-anchor { background: var(--surface-2); border-color: var(--border-2); }
.fr-bento-n { font-family: var(--f-head); font-weight: 800; font-size: 2rem; margin-bottom: var(--sp-1); }
.fr-bento-anchor .fr-bento-d { color: var(--text); opacity: .82; max-width: 34ch; }
.fr-bento-h { font-family: var(--f-head); font-weight: 700; font-size: 1.1rem; margin-bottom: var(--sp-1); max-width: 20ch; }
.fr-bento-cell .fr-bento-d { font-size: .92rem; max-width: 30ch; }

@media (min-width: 860px) {
  .fr-bento { grid-template-columns: repeat(12, 1fr); }
  .fr-bento-anchor { grid-column: span 6; grid-row: span 2; display: flex; flex-direction: column; justify-content: center; }
  .fr-bento-anchor .fr-bento-n { font-size: 2.6rem; }
  .fr-bento-cell:not(.fr-bento-anchor) { grid-column: span 3; }
}

/* ── horizontal-scroll case strip ──────────────────────────────────────── */
.fr-cases-sec .fr-wrap { margin-bottom: var(--sp-4); }
.fr-rail { position: relative; }
/* the .fr-sec base rule sets overflow:hidden (to contain parallax-bg bleed on other
   sections); that breaks position:sticky for .fr-rail-sticky inside this section, so
   override it back to visible here specifically (higher specificity than .fr-sec alone). */
.fr-sec.fr-cases-sec { overflow: visible; }
.fr-rail-sticky { position: static; }
.fr-rail-track {
  display: flex; gap: var(--sp-2); overflow-x: auto; -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity; padding: 0 var(--sp-3) var(--sp-2);
}
.fr-rail-track::-webkit-scrollbar { display: none; }
.fr-case-card {
  scroll-snap-align: start; flex: 0 0 auto; width: 78vw; max-width: 320px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 20px;
  padding: var(--sp-3); display: flex; flex-direction: column; gap: var(--sp-1);
  transition: border-color .2s ease, transform .18s ease;
}
.fr-case-card:hover { border-color: var(--border-2); }
.fr-case-niche { color: var(--muted-2); font-size: .74rem; text-transform: uppercase; }
.fr-case-name { font-family: var(--f-head); font-weight: 700; font-size: 1.15rem; }
.fr-case-result { color: var(--muted); font-size: .92rem; flex: 1; }
.fr-case-go { color: var(--accent); font-weight: 600; font-size: .88rem; margin-top: var(--sp-1); }

/* Desktop scroll-jacking rail (JS adds .is-rail-pinned when pointer:fine,
   !prefers-reduced-motion and viewport wide enough). Sticky inner viewport,
   track translated horizontally by JS as a function of vertical scroll
   progress through the tall .fr-rail container — contained entirely to this
   section; normal page scroll resumes immediately before/after it. */
@media (min-width: 1024px) {
  .fr-rail.is-rail-pinned { height: var(--rail-h, 220vh); }
  .fr-rail.is-rail-pinned .fr-rail-sticky {
    position: sticky; top: 0; height: 100vh; display: flex; align-items: center; overflow: hidden;
  }
  .fr-rail.is-rail-pinned .fr-rail-track {
    overflow: visible; flex-wrap: nowrap; padding: 0 var(--sp-6); will-change: transform;
  }
  .fr-rail.is-rail-pinned .fr-case-card { width: 320px; }
}

/* ── before / after scrollytelling ─────────────────────────────────────── */
.fr-ba { background: var(--bg-2); }
.fr-ba-bg {
  position: absolute; inset: -20% 0; z-index: 0; pointer-events: none;
  background: radial-gradient(70% 60% at 50% 40%, rgba(0,229,160,.06), transparent 70%);
}
.fr-ba .fr-wrap { position: relative; z-index: 1; }
.fr-ba-grid { display: grid; grid-template-columns: 1fr; gap: var(--sp-6); }
.fr-ba-col ul { display: flex; flex-direction: column; gap: var(--sp-2); }
.fr-ba-col li {
  padding: var(--sp-2) 0 var(--sp-2) var(--sp-3); border-left: 2px solid var(--border-2);
  color: var(--muted); font-size: 1rem;
}
.fr-ba-after li { border-left-color: var(--accent); color: var(--text); }
@media (min-width: 860px) { .fr-ba-grid { grid-template-columns: 1fr 1fr; } }

/* ── quiz stepper ──────────────────────────────────────────────────────── */
.fr-quiz-progress { height: 4px; background: var(--surface-2); border-radius: 4px; margin-bottom: var(--sp-5); overflow: hidden; }
.fr-quiz-progress-bar { height: 100%; width: 25%; background: var(--accent); transition: width .3s ease; }
.fr-quiz-step h3 { font-size: 1.3rem; font-weight: 700; margin-bottom: var(--sp-3); max-width: 28ch; }
.fr-step-hint { color: var(--muted-2); font-size: .85rem; margin: calc(-1 * var(--sp-2)) 0 var(--sp-2); }

.fr-chips { display: flex; flex-wrap: wrap; gap: var(--sp-1); }
.fr-chips-col { flex-direction: column; align-items: flex-start; }
.fr-chip {
  position: relative; display: inline-flex; align-items: center;
  padding: 12px 18px; border-radius: 999px; border: 1px solid var(--border-2);
  background: var(--surface); cursor: pointer; font-size: .92rem; transition: border-color .15s ease, background .15s ease;
}
.fr-chips-col .fr-chip { width: 100%; }
.fr-chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.fr-chip:has(input:checked) { border-color: var(--accent); background: rgba(0,229,160,.1); color: var(--text); }
.fr-chip:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }

.fr-step-nav { display: flex; gap: var(--sp-2); margin-top: var(--sp-4); }
.fr-step-nav .fr-btn { flex: 1; }

.fr-field { margin-bottom: var(--sp-3); }
.fr-field label { display: block; margin-bottom: var(--sp-1); font-size: .85rem; color: var(--muted-2); }
.fr-fld {
  width: 100%; padding: 14px 16px; border-radius: 12px; border: 1px solid var(--border-2);
  background: var(--surface); color: var(--text); font-family: var(--f-body); font-size: 1rem;
}
.fr-fld:focus { outline: none; border-color: var(--accent); }
.fr-channels { margin-bottom: var(--sp-3); }
.fr-channels-h { font-size: .85rem; color: var(--muted-2); margin-bottom: var(--sp-1); }
.fr-channels-grid { display: flex; flex-wrap: wrap; gap: var(--sp-1); }

.fr-hp-wrap { position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.fr-consent { display: flex; align-items: flex-start; gap: var(--sp-1); font-size: .85rem; color: var(--muted); margin: var(--sp-2) 0 var(--sp-3); cursor: pointer; }
.fr-consent input { margin-top: 3px; }
.fr-consent a { color: var(--accent); text-decoration: underline; }
.fr-form-msg { margin-top: var(--sp-2); font-size: .9rem; }
.fr-form-msg.is-err { color: #FF6B6B; }
.fr-form-msg.is-ok { color: var(--accent); }
.fr-final-count { margin-top: var(--sp-4); color: var(--muted-2); }

/* ── team ──────────────────────────────────────────────────────────────── */
.fr-team { display: flex; flex-direction: column; gap: var(--sp-3); align-items: flex-start; }
.fr-avatar-mono {
  width: 88px; height: 88px; border-radius: 50%; flex: none;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--f-head); font-weight: 800; font-size: 1.6rem;
  color: var(--accent); background: var(--surface-2); border: 2px solid var(--accent);
}
.fr-team-txt h3 { font-size: 1.3rem; margin-bottom: 4px; }
.fr-team-role { color: var(--muted-2); font-size: .85rem; margin-bottom: var(--sp-2); }
.fr-team-txt p { max-width: 50ch; }
.fr-quote {
  margin: var(--sp-6) 0 0; padding: var(--sp-4) 0 0; border-top: 1px solid var(--border);
  font-family: var(--f-head); font-weight: 600; font-size: 1.3rem; max-width: 34ch;
  color: var(--text);
}
.fr-quote cite { display: block; margin-top: var(--sp-2); font-family: var(--f-body); font-weight: 400; font-style: normal; font-size: .85rem; color: var(--muted-2); }
@media (min-width: 860px) { .fr-team { flex-direction: row; align-items: center; } }

/* ── final CTA plate ───────────────────────────────────────────────────── */
.fr-final { background: var(--bg-2); text-align: left; padding: var(--sp-12) 0; }
.fr-final .fr-jit { margin: var(--sp-3) 0 var(--sp-5); }

/* ── thanks page ───────────────────────────────────────────────────────── */
.fr-thanks { text-align: left; padding-top: var(--sp-16); }
.fr-thanks-mark { font-size: 2.6rem; margin-bottom: var(--sp-2); }
.fr-thanks-magnets { margin-top: var(--sp-6); padding-top: var(--sp-4); border-top: 1px solid var(--border); }
.fr-magnet-list { display: flex; flex-direction: column; gap: var(--sp-1); margin-top: var(--sp-2); }
.fr-magnet {
  display: flex; align-items: center; gap: var(--sp-2); padding: var(--sp-2);
  border: 1px solid var(--border-2); border-radius: 14px; background: var(--surface);
}
.fr-magnet-ic { font-size: 1.2rem; }
.fr-thanks-empty p { max-width: 46ch; margin-top: var(--sp-1); }
.fr-back-link { display: inline-block; margin-top: var(--sp-6); color: var(--muted); text-decoration: underline; }

/* ── mobile sticky CTA bar (≤768px; hidden by default, JS toggles .is-on) ── */
.fr-sticky-cta {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  padding: var(--sp-2) var(--sp-3) calc(var(--sp-2) + env(safe-area-inset-bottom));
  background: rgba(10,10,10,.9); backdrop-filter: blur(10px);
  border-top: 1px solid var(--border);
  transform: translateY(110%); transition: transform .25s ease;
}
.fr-sticky-cta.is-on { transform: translateY(0); }
@media (min-width: 860px) { .fr-sticky-cta { display: none; } }

/* ── reveal-on-scroll (progressive enhancement, no layout dependency) ──── */
[data-reveal] { opacity: 1; }

/* ── reduced motion / no-fine-pointer: parallax + magnetic are JS-gated, but
   make sure nothing ever visually breaks if JS still sets an inline transform
   right before the gate gets applied. ─────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .fr-page * { scroll-behavior: auto !important; }
}

html { scroll-behavior: smooth; }
