/* /pos/ — No monthly fee: the seasonal chart (a fixed fee vs none), the reasons, the calculator.
   The chart's bars are heights out of 100 (--h); the fee is the same 13 units every month, so in
   a quiet month it is a bigger share of the bar. data-view="fee|free" (set by the segmented
   control) shrinks the fee away. Illustrative: no figures are shown. */

.nmf {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(55% 60% at 12% 0%, rgba(59, 91, 255, 0.35) 0%, transparent 70%),
    radial-gradient(45% 55% at 95% 100%, rgba(0, 209, 167, 0.22) 0%, transparent 70%),
    var(--tp-midnight);
}
.nmf .eyebrow {
  color: var(--mint-300);
}
.nmf .section-head .lead {
  color: var(--ink-200);
}

.nmf-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 32px;
  align-items: stretch;
}

/* The chart card */
.nmf-chart-card {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin: 0;
  padding: 28px;
  border-radius: var(--radius-panel);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.07) 0%, rgba(255, 255, 255, 0.03) 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 40px 80px -40px rgba(0, 0, 0, 0.6);
}
.nmf-chart-card__top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
}
.nmf-chart-card__label {
  display: block;
  font-size: var(--fs-label);
  color: var(--ink-300);
}
.nmf-chart-card__title {
  display: grid;
  margin-top: 4px;
  font-size: 24px;
  letter-spacing: -0.02em;
  color: var(--text-inverse);
}
.nmf-chart-card__title > span {
  grid-area: 1 / 1;
  transition:
    opacity 0.4s ease,
    transform 0.5s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.nmf-when-free {
  color: var(--mint-300);
}
.nmf-chart-card:has([data-view="fee"]) .nmf-when-free,
.nmf-chart-card:has([data-view="free"]) .nmf-when-fee {
  opacity: 0;
  transform: translateY(8px);
}

.nmf-seg button {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink-200);
}
.nmf-seg button:hover {
  background: rgba(255, 255, 255, 0.1);
}
.nmf-seg button[aria-pressed="true"] {
  background: var(--text-inverse);
  border-color: var(--text-inverse);
  color: var(--tp-midnight);
}
.nmf-seg button:focus-visible {
  outline: 2px solid var(--mint-300);
  outline-offset: 2px;
}

.nmf-chart {
  position: relative;
  flex: 1;
  min-height: 260px;
  padding-top: 8px;
  background-image: linear-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px);
  background-size: 100% 25%;
  background-position: 0 8px;
}
.nmf-chart__bars {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  align-items: end;
  gap: 8px;
  height: calc(100% - 24px);
}
.nmf-bar {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  height: calc(var(--h) * 1%);
  border-radius: 8px 8px 4px 4px;
  background: linear-gradient(180deg, var(--blue-300) 0%, var(--tp-blue) 100%);
  transform-origin: bottom;
}
.nmf-bar b {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -24px;
  text-align: center;
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-400);
}
/* The fee: always 13 of the chart's 100 units, whatever the month took. */
.nmf-bar__fee {
  display: block;
  height: calc(13 / var(--h) * 100%);
  border-radius: 0 0 4px 4px;
  background:
    repeating-linear-gradient(-45deg, rgba(255, 255, 255, 0.18) 0 3px, transparent 3px 7px),
    var(--tp-sunrise);
  box-shadow: 0 -2px 0 rgba(11, 16, 32, 0.4);
  transition:
    height 0.6s cubic-bezier(0.2, 0.7, 0.2, 1),
    opacity 0.4s ease;
}
.nmf-chart[data-view="free"] .nmf-bar__fee {
  height: 0;
  opacity: 0;
}
.nmf-chart[data-view="free"] .nmf-bar {
  background: linear-gradient(180deg, var(--mint-300) 0%, var(--mint-600, #00a888) 100%);
}
.nmf-bar {
  transition: background 0.6s ease;
}
/* The bars grow in when the card is revealed. */
.js .nmf-chart-card.reveal .nmf-bar {
  transform: scaleY(0.04);
  transition:
    transform 0.9s cubic-bezier(0.2, 0.7, 0.2, 1),
    background 0.6s ease;
}
.js .nmf-chart-card.reveal.is-visible .nmf-bar {
  transform: none;
}
.nmf-bar:nth-child(2) {
  transition-delay: 40ms;
}
.nmf-bar:nth-child(3) {
  transition-delay: 80ms;
}
.nmf-bar:nth-child(4) {
  transition-delay: 120ms;
}
.nmf-bar:nth-child(5) {
  transition-delay: 160ms;
}
.nmf-bar:nth-child(6) {
  transition-delay: 200ms;
}
.nmf-bar:nth-child(7) {
  transition-delay: 240ms;
}
.nmf-bar:nth-child(8) {
  transition-delay: 280ms;
}
.nmf-bar:nth-child(9) {
  transition-delay: 320ms;
}
.nmf-bar:nth-child(10) {
  transition-delay: 360ms;
}
.nmf-bar:nth-child(11) {
  transition-delay: 400ms;
}
.nmf-bar:nth-child(12) {
  transition-delay: 440ms;
}

.nmf-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-top: 8px;
  font-size: var(--fs-label);
  color: var(--ink-300);
}
.nmf-legend span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.nmf-key {
  width: 12px;
  height: 12px;
  border-radius: 3px;
}
.nmf-key--takings {
  background: var(--tp-blue);
}
.nmf-key--fee {
  background: var(--tp-sunrise);
}
.nmf-chart-card:has([data-view="free"]) .nmf-legend span:last-child {
  text-decoration: line-through;
  opacity: 0.6;
}
.nmf-caption {
  font-size: var(--fs-caption);
  color: var(--ink-400);
  text-wrap: pretty;
}

/* The reasons */
.nmf-reasons {
  display: grid;
  grid-template-rows: repeat(4, auto);
  gap: 12px;
}
.nmf-reason {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 16px;
  padding: 20px 22px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition:
    background 0.3s,
    border-color 0.3s;
}
.nmf-reason:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(0, 209, 167, 0.35);
}
.nmf-reason__icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(0, 209, 167, 0.14);
  color: var(--mint-300);
}
.nmf-reason h3 {
  color: var(--text-inverse);
  margin-bottom: 4px;
}
.nmf-reason p {
  margin: 0;
  color: var(--ink-300);
  text-wrap: pretty;
}

/* The calculator */
.nmf-calc {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: 32px;
  align-items: center;
  margin-top: 32px;
  padding: 32px;
  border-radius: var(--radius-panel);
  background: var(--surface-card);
  color: var(--tp-midnight);
  box-shadow: 0 40px 80px -40px rgba(0, 0, 0, 0.6);
}
.nmf .nmf-calc h3 {
  color: var(--tp-midnight);
}
.nmf .nmf-calc p {
  color: var(--ink-600);
  margin: 8px 0 20px;
}
.nmf-calc__fields {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 16px;
}
.nmf-calc__money {
  position: relative;
}
.nmf-calc__money span {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ink-500);
  font-weight: 500;
}
.nmf-calc__money .input {
  padding-left: 32px;
}
.nmf-calc .input {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}
.nmf-calc__answer {
  display: grid;
  grid-template-columns: 1fr 1fr 1.2fr;
  gap: 12px;
}
.nmf-calc__answer > div {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 18px 20px;
  border-radius: 18px;
  background: #fff4ee;
}
.nmf-calc__answer span {
  font-size: var(--fs-label);
  color: var(--ink-600);
}
.nmf-calc__answer strong {
  font-size: 32px;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: #b8461b;
  font-variant-numeric: tabular-nums;
}
.nmf-calc__answer .nmf-calc__ours {
  background: var(--gradient-hero);
  color: var(--text-inverse);
}
.nmf-calc__ours span,
.nmf-calc__ours small {
  color: var(--ink-300);
}
.nmf-calc__ours small {
  font-size: var(--fs-caption);
}
.nmf-calc__answer .nmf-calc__ours strong {
  color: var(--mint-300);
  font-size: 40px;
}

@media (max-width: 1100px) {
  .nmf-grid,
  .nmf-calc {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (max-width: 640px) {
  .nmf-chart-card,
  .nmf-calc {
    padding: 20px;
  }
  .nmf-chart {
    height: 200px;
  }
  .nmf-chart__bars {
    gap: 4px;
  }
  .nmf-bar b {
    font-size: 10px;
  }
  .nmf-calc__answer {
    grid-template-columns: 1fr 1fr;
  }
  .nmf-calc__ours {
    grid-column: 1 / -1;
  }
  /* Scales down on the narrowest phones so a four-figure-a-month total still fits its box
     (£64,080 was cut off at 320px). */
  .nmf-calc__answer strong {
    font-size: clamp(18px, 6vw, 26px);
    overflow-wrap: break-word;
  }
  .nmf-calc__answer > div {
    padding: 16px;
  }
}

/* Tuppence hardware (partials/hardware.html, on /pos/ and /us/pos/): one card per device, each a
   link to its own page, with the poster rendered from that page's 3D model. */
.pos-hw {
  background:
    radial-gradient(55% 60% at 80% 0%, rgba(59, 91, 255, 0.28) 0%, transparent 70%), #070a16;
}
.pos-hw .section-head .lead {
  color: var(--ink-200);
}
.pos-hw__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}
.pos-hw__card {
  display: flex;
  flex-direction: column;
  border-radius: 24px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: inherit;
  text-decoration: none;
  transition:
    transform 0.35s cubic-bezier(0.2, 0.7, 0.2, 1),
    border-color 0.35s;
}
.pos-hw__card:hover,
.pos-hw__card:focus-visible {
  transform: translateY(-4px);
  border-color: rgba(147, 165, 255, 0.45);
}
.pos-hw__media {
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #eef1f7; /* the light studio of each device's 3D viewer poster */
}
.pos-hw__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 50%;
  transition: transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.pos-hw__card:hover .pos-hw__media img {
  transform: scale(1.04);
}

.pos-hw__body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 24px 28px 28px;
}
.pos-hw__tag {
  font: 600 0.75rem / 1.2 var(--font-sans);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mint-300);
}
.pos-hw__name {
  font: 800 1.75rem / 1.1 var(--font-display);
  letter-spacing: -0.02em;
  color: #fff;
}
.pos-hw__text {
  color: var(--ink-200);
  line-height: 1.6;
}
.pos-hw__card .link-arrow {
  margin-top: 6px;
  color: var(--blue-300);
}
@media (max-width: 759px) {
  .pos-hw__grid {
    grid-template-columns: 1fr;
  }
  .pos-hw__body {
    padding: 20px 20px 24px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .pos-hw__card,
  .pos-hw__media img {
    transition: none;
  }
}
