/* Nirvani offer rail
   The shared "what happens next" block at the foot of every calculator, every
   industry playbook and the tools index. Markup is generated by
   _build/offer_rail.py, behaviour lives in assets/js/offer-rail.js.
   Reads the page tokens (--gold-core, --text-0, --text-3, --radius, --ease)
   with fallbacks so it renders the same on every shell. */

.nv-rail {
  position: relative;
  max-width: 1060px;
  margin: 0 auto 72px;
  padding: 56px 40px 46px;
  border: 1px solid rgba(212, 168, 67, 0.45);
  border-radius: var(--radius, 0);
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(212, 168, 67, 0.10), transparent 70%),
    linear-gradient(180deg, rgba(28, 28, 28, 0.96), rgba(14, 14, 14, 0.98));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 18px 60px rgba(0, 0, 0, 0.6),
    0 0 40px rgba(212, 168, 67, 0.12);
  text-align: center;
}
.nv-rail::before {
  content: '';
  position: absolute; left: 10%; right: 10%; top: -1px; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 240, 181, 0.9), transparent);
  pointer-events: none;
}

.nv-rail-eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  margin: 0 0 16px;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px; font-weight: 700; letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gold-core, #D4A843);
  text-shadow: 0 0 12px rgba(212, 168, 67, 0.4);
}
.nv-rail-eyebrow::before, .nv-rail-eyebrow::after {
  content: ''; display: inline-block; width: 32px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-core, #D4A843), transparent);
}

.nv-rail h2 {
  margin: 0 0 14px;
  font-size: clamp(26px, 3.2vw, 40px);
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.14;
  color: var(--text-0, #FFFFFF);
  text-wrap: balance;
}
.nv-rail h2 em {
  font-style: normal;
  background: linear-gradient(135deg, #D4A843 0%, #F4D572 30%, #FFEDB3 50%, #F4D572 70%, #D4A843 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.nv-rail-lede {
  max-width: 640px;
  margin: 0 auto 36px;
  font-size: 15.5px; line-height: 1.65;
  color: var(--text-3, #B0B8C4);
}

/* ---- the four tiles ---- */
.nv-rail-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  text-align: left;
}
.nv-tile {
  position: relative;
  display: flex; flex-direction: column; gap: 10px;
  padding: 22px 20px 20px;
  border: 1px solid rgba(212, 168, 67, 0.22);
  border-radius: var(--radius, 0);
  background: linear-gradient(180deg, rgba(20, 17, 11, 0.85), rgba(6, 6, 6, 0.9));
  color: inherit;
  text-decoration: none;
  overflow: hidden;
  isolation: isolate;
  transition: transform 0.3s var(--ease, ease), border-color 0.3s var(--ease, ease), box-shadow 0.3s var(--ease, ease);
}
.nv-tile::after {
  /* soft gold wash that rises on hover */
  content: '';
  position: absolute; inset: auto -20% -60% -20%; height: 120%;
  background: radial-gradient(ellipse at 50% 100%, rgba(212, 168, 67, 0.16), transparent 60%);
  opacity: 0;
  transition: opacity 0.4s var(--ease, ease);
  z-index: -1;
  pointer-events: none;
}
.nv-tile:hover, .nv-tile:focus-within {
  transform: translateY(-3px);
  border-color: rgba(244, 213, 114, 0.6);
  box-shadow: 0 0 0 1px rgba(244, 213, 114, 0.18), 0 22px 50px -24px rgba(212, 168, 67, 0.55);
}
.nv-tile:hover::after, .nv-tile:focus-within::after { opacity: 1; }
a.nv-tile:focus-visible { outline: 2px solid var(--gold-bright, #F4D572); outline-offset: 2px; }

.nv-tile.is-primary {
  border-color: rgba(244, 213, 114, 0.55);
  background: linear-gradient(180deg, rgba(46, 37, 15, 0.92), rgba(10, 9, 6, 0.96));
  box-shadow: 0 0 0 1px rgba(244, 213, 114, 0.12), 0 0 48px -12px rgba(212, 168, 67, 0.45);
}
.nv-tile.is-primary::after { opacity: 0.6; }

.nv-tile-k {
  display: flex; align-items: center;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold-core, #D4A843);
}
.nv-tile-k b {
  display: inline-grid; place-items: center;
  width: 22px; height: 22px; margin-right: 9px;
  border-radius: 50%;
  font-size: 10px; font-weight: 700; letter-spacing: 0;
  color: #120F08;
  background: linear-gradient(180deg, #FFF0B5, #D4A843);
}
.nv-tile strong {
  font-size: 17px; line-height: 1.3;
  font-weight: 700; letter-spacing: -0.01em;
  color: var(--text-0, #FFFFFF);
}
.nv-tile p {
  margin: 0; flex: 1;
  font-size: 13.5px; line-height: 1.55;
  color: var(--text-3, #B0B8C4);
}
.nv-tile-go {
  display: inline-flex; align-items: center; gap: 8px;
  margin-top: 6px;
  font-size: 12px; font-weight: 700; letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold-bright, #F4D572);
}
.nv-tile-go::after { content: '\2192'; transition: transform 0.3s var(--ease, ease); }
.nv-tile:hover .nv-tile-go::after { transform: translateX(4px); }

.nv-live {
  display: inline-block; width: 7px; height: 7px; margin-left: 9px;
  border-radius: 50%;
  background: #1E8E3E;
  box-shadow: 0 0 0 3px rgba(30, 142, 62, 0.22);
  animation: nv-pulse 1.9s ease-in-out infinite;
}
@keyframes nv-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.35); opacity: 0.55; }
}

/* the give-back tile holds two links, so it is a div with rows */
.nv-tile-split { gap: 12px; }
.nv-mini {
  display: block;
  padding: 10px 12px;
  border: 1px solid rgba(212, 168, 67, 0.16);
  border-radius: var(--radius, 0);
  background: rgba(0, 0, 0, 0.35);
  color: inherit;
  text-decoration: none;
  transition: border-color 0.3s var(--ease, ease), background 0.3s var(--ease, ease);
}
.nv-mini:hover, .nv-mini:focus-visible {
  border-color: rgba(244, 213, 114, 0.55);
  background: rgba(212, 168, 67, 0.08);
  outline: none;
}
.nv-mini strong { display: block; font-size: 14.5px; margin-bottom: 3px; }
.nv-mini span { display: block; font-size: 12.5px; line-height: 1.5; color: var(--text-3, #B0B8C4); }
.nv-mini em { font-style: normal; color: var(--gold-bright, #F4D572); font-weight: 700; }

/* ---- keep-this-run form (calculators only) ---- */
.nv-rail-form {
  margin-top: 40px;
  padding-top: 36px;
  border-top: 1px solid rgba(212, 168, 67, 0.18);
}
.nv-rail-form h3 {
  margin: 0 0 10px;
  font-size: clamp(20px, 2.2vw, 26px);
  line-height: 1.25;
  color: var(--text-0, #FFFFFF);
}
.nv-rail-sub {
  max-width: 580px;
  margin: 0 auto 24px;
  font-size: 14.5px; line-height: 1.6;
  color: var(--text-3, #B0B8C4);
}
.nv-rail .unlock-success { padding-top: 10px; }

@media (max-width: 1024px) {
  .nv-rail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .nv-rail { padding: 44px 20px 36px; margin-bottom: 56px; }
  .nv-rail-grid { grid-template-columns: 1fr; gap: 12px; }
  .nv-tile { padding: 20px 18px 18px; }
  .nv-rail-lede { margin-bottom: 28px; }
}
@media (prefers-reduced-motion: reduce) {
  .nv-live { animation: none; }
  .nv-tile, .nv-tile-go::after { transition: none; }
  .nv-tile:hover, .nv-tile:focus-within { transform: none; }
}
