/* Forge Night (round 6): night-af.css. Night-only rules, each scoped under html[data-look="night"]. */

/* Agent Frank page, main content. Loads after night-base.css, night.css, night-features.css and night-overlays.css,
   so equal selectors here win. Surfaces used on this page:
     page              --n-bg
     large grey panels --n-bg-2 with a hairline (the good-fit frame, the with/without panel)
     cards             --n-surface with a hairline (benefit cards, step cards, savings cards)
     chips on cards    --n-surface-2
   Borders that day draws are recoloured; where day has none, an inset hairline (box-shadow) is used instead so no
   size changes. */

/* ================================================================ shared */

/* the small violet labels above headings ("Explore the Benefits", "Pricing", "Wall of Love", "Premium" ...) */
html[data-look="night"] main .tag { background: rgba(143, 99, 246, .16); color: var(--n-violet-text); }

/* ================================================================ top section */

/* the six badges under the heading: quiet neutral pills (day's soft drop shadow cannot be seen on dark) */
html[data-look="night"] .af-badge {
  background: rgba(255, 255, 255, .05); box-shadow: inset 0 0 0 1px var(--n-line); filter: none; color: #dcdce6;
}

/* Frank's video card stands alone, so it is framed as a lit object with the violet glow */
html[data-look="night"] .mp4 img,
html[data-look="night"] .mp4__video { box-shadow: var(--n-glow); }
html[data-look="night"] .mp4__play { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2), 0 10px 30px -8px rgba(143, 99, 246, .9); }

/* ================================================================ logo row */

/* VAI Consulting is white lettering on its own blue box. Greyed, the box is pushed to black and the letters to
   white; the black then drops out of the page, so only the lettering shows, like the other logos. The logo grid
   is a layer of its own, so its cells carry the page colour for the black to blend into (no visible change). */
html[data-look="night"] .af-logos .logos__grid { background-color: var(--n-bg); }   /* on the grid, so the cells keep its frame line */
html[data-look="night"] img.logo__img.logo__img--vai {
  filter: grayscale(1) brightness(.75) contrast(6); mix-blend-mode: screen; opacity: .85;   /* crisp letters and mark, as on the homepage tile */
}
/* Rolling Suds has white outlines and a white strapline inside a green bar; a plain white silhouette fills those in,
   so it is shown in soft greys instead, which keeps them. */
html[data-look="night"] img.logo__img.logo__img--rolling { filter: grayscale(1) contrast(1.6) brightness(1.05); opacity: .8; }
/* the "Case Study" tags: neutral pills */
html[data-look="night"] .logo__badge { background: rgba(255, 255, 255, .05); border-color: var(--n-line-2); color: #dcdce6; }

/* ================================================================ Why Work With Agent Frank */

/* the five light grey panels become raised dark cards with a hairline edge (background-color only, so the
   pictures of the two wide cards stay) */
html[data-look="night"] .afp-card,
html[data-look="night"] .afp-wide,
html[data-look="night"] .afp-wide.afp-wide--intel { background-color: var(--n-surface); box-shadow: inset 0 0 0 1px var(--n-line); }

/* the faint violet square grids: colour-turned so the thin grid lines glow softly and the pale filled squares,
   which show up as grey blocks on dark, sink away */
html[data-look="night"] .afp-card__squares,
html[data-look="night"] .afpc-calc__sq img { filter: invert(1) hue-rotate(180deg); opacity: .7; }
/* the "Less Overhead" funnel was drawn for a light grey card; at night its pale slab was the brightest thing in the
   row, so it is lowered a little and keeps its lavender */
html[data-look="night"] .afp-card img[src*="af-features-illu-02-165"] { filter: brightness(.84) saturate(1.1); }

/* Card 1: the name "Agent Frank" inside the picture is dark ink on a see-through background and disappears on a
   dark card. The same picture is laid over it, colour-turned and cut down to just that name, so the name reads
   light while Frank's photo, the dots and the "Auto-pilot" pill stay exactly as drawn. The layer follows the
   picture's box at every width. */
html[data-look="night"] .afp__grid > .afp-card:first-child::after {
  content: ""; position: absolute; z-index: 2; left: 32px; top: 36px; width: calc(100% - 64px); aspect-ratio: 1026 / 720;
  background: url("../img/af-features-illu-02.avif") 0 0 / 100% 100% no-repeat;
  filter: invert(1) hue-rotate(180deg); pointer-events: none;
  -webkit-mask: linear-gradient(#000 0 0) 49.72% 80.09% / 31.58% 8.61% no-repeat;
  mask: linear-gradient(#000 0 0) 49.72% 80.09% / 31.58% 8.61% no-repeat;
}
@media (max-width: 991px) {
  html[data-look="night"] .afp__grid > .afp-card:first-child::after { left: 12px; top: 24px; width: calc(100% - 24px); }
}
@media (min-width: 480px) and (max-width: 767px) {
  /* the picture takes 30 % of the row and sits in the middle of the card's content box (24 px above, 32 px below) */
  html[data-look="night"] .afp__grid > .afp-card:first-child::after {
    top: calc(50% - 4px); width: calc((100% - 24px) * .3); transform: translateY(-50%);
  }
}

/* phones: the two wide cards' pictures end in a white fade that sits under the first line of the heading. Each
   picture is painted in a layer of its own, 1 px inside the card so the hairline stays, with a fade into the card
   colour over its lower part that is solid just before the text starts; nothing of the white can show below it. */
@media (max-width: 479px) {
  html[data-look="night"] .afp-wide,
  html[data-look="night"] .afp-wide.afp-wide--intel { background-image: none; }
  html[data-look="night"] .afp-wide::before {
    content: ""; position: absolute; left: 1px; right: 1px; top: 1px; z-index: 0; aspect-ratio: 1446 / 1248;
    border-radius: 11px 11px 0 0; pointer-events: none;
    background:
      linear-gradient(180deg, rgba(21, 22, 32, 0) min(55%, 190px), var(--n-surface) min(84%, 262px)),
      linear-gradient(rgba(21, 22, 32, .45), rgba(21, 22, 32, .45)),   /* sinks the pale dome behind the avatars to dusk */
      url("../img/m-af-unlimited-illu.avif") 100% 0 / 130% auto no-repeat;
  }
  html[data-look="night"] .afp-wide.afp-wide--intel::before {
    aspect-ratio: 1209 / 1056;
    background:
      linear-gradient(180deg, rgba(21, 22, 32, 0) min(58%, calc(70vw - 80px)), var(--n-surface) min(86%, calc(70vw - 6px))),
      url("../img/m-af-intelligence-illu.avif") 50% 0 / 100% auto no-repeat;
  }
  html[data-look="night"] .afp-wide__text { position: relative; z-index: 1; }
}

/* ================================================================ good fit / not-so-good fit */

html[data-look="night"] .fit--af .fit__frame { background: var(--n-bg-2); box-shadow: inset 0 0 0 1px var(--n-line); }
/* the rising line at the top: its picture is an opaque near-white band under a violet line and dot. Colour-turned,
   the band goes black and the line and dot stay violet; the black then drops out against the panel. */
html[data-look="night"] .fit--af .fit__graph img { filter: invert(1) hue-rotate(180deg) contrast(1.15); mix-blend-mode: screen; }
html[data-look="night"] .fit--af .fit__item { background: var(--n-surface); color: #e6e7ef; }
html[data-look="night"] .fit--af .fit__icon { background: rgba(255, 255, 255, .04); box-shadow: inset 0 0 0 1px var(--n-line); }
/* the violet line icons are lifted to light violet so they read on the dark squares */
html[data-look="night"] .fit--af .fit__icon img { filter: invert(1) hue-rotate(180deg); }
html[data-look="night"] .fit--af .fit__badge--light { background: rgba(143, 99, 246, .16); color: var(--n-violet-text); }

/* ================================================================ the seven steps */

/* the thin rail behind the numbers */
html[data-look="night"] .afs__steps::before { background: rgba(255, 255, 255, .03); border-color: var(--n-line-2); }
/* the numbers: their day white ring becomes a ring of page colour, which parts them from the rail */
html[data-look="night"] .afs-step__num { border-color: var(--n-bg); box-shadow: 0 6px 18px -6px rgba(143, 99, 246, .75); }
/* the cards: a raised surface, a touch lighter at the top, with a clear edge; opaque, as they slide over each other */
html[data-look="night"] .afs-card { background-image: linear-gradient(180deg, var(--n-surface), var(--n-bg-2)); border-color: var(--n-line-2); }

/* Steps 3, 4 and 5: the product pictures were drawn see-through for a white card (pale dividers, white chips and
   panels, a fade to white at the bottom). On the dark card they read half converted, with bright lines, white
   boxes and a grey veil at the bottom. Colour-turned as a whole, they read as the product's own dark screens: panels
   go dark, words go light, violet, red and green keep their hue, and the bottom fade melts into the card.
   Step 2 stays as drawn: there, colour-turning would dim its small grey labels. */
html[data-look="night"] .afs-step:is(:nth-child(3), :nth-child(4), :nth-child(5)) .afs-card__art img { filter: invert(1) hue-rotate(180deg); }

/* step 6: the six pills are chips on the card (opaque, as on phones they overlap the picture below them) */
html[data-look="night"] .afs-pill { background: var(--n-surface-2); border-color: var(--n-line-2); box-shadow: none; }
html[data-look="night"] .afs-pill__label { color: var(--n-ink); }
/* their notes (wide screens, on hover or keyboard focus): the strongest raise, with an edge, so they stand off the card */
html[data-look="night"] .afs-tip {
  background: var(--n-surface-3); color: var(--n-ink);
  box-shadow: 0 0 0 1px var(--n-line-2), 0 18px 40px -12px rgba(0, 0, 0, .8);
}
html[data-look="night"] .afs-tip__tail path { fill: var(--n-surface-3); }

/* step 7, "Experience Agent Frank": the violet card stays violet, the brand's light, with a soft glow under it */
html[data-look="night"] .afs-try { box-shadow: 0 0 0 1px rgba(183, 164, 255, .22), 0 30px 80px -30px rgba(143, 99, 246, .7); }
html[data-look="night"] .afs-try :focus-visible { outline-color: #fff; }   /* on the violet card the light violet ring is lost */
html[data-look="night"] .afs-done__art { filter: invert(1) hue-rotate(180deg) brightness(1.15); }   /* white discs become dark chips */
/* its fields keep day's lilac edges (the generated dark edges were hard to see), with a clear white focus */
html[data-look="night"] .afs-field { border-color: #b692f6; box-shadow: none; color-scheme: dark; }
html[data-look="night"] .afs-field:hover { border-color: #e9d7fe; }
html[data-look="night"] .afs-field:focus { border-color: #fff; box-shadow: 0 0 0 4px rgba(255, 255, 255, .18); }
/* the button stays white on the violet card, the strongest call on the page */
html[data-look="night"] .afs-submit { background-color: #fff; border-color: #fff; color: #5e39b4; }
html[data-look="night"] .afs-submit:hover { border-color: #fff; opacity: .9; }
@media (max-width: 767px) {
  html[data-look="night"] .afs-submit:hover { background-color: #7f56d9; border-color: #b692f6; color: #fff; opacity: 1; }
}
/* the message after sending (demo, nothing is sent): a dark screen set into the violet card, like the price
   calculator further down */
html[data-look="night"] .afs-done { background: var(--n-bg); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06); }
html[data-look="night"] .afs-done__title { color: var(--n-ink); }
html[data-look="night"] .afs-done__text { color: var(--n-body); }
html[data-look="night"] .afs-done__cta { color: var(--n-violet-text); }

/* ================================================================ email infrastructure */

html[data-look="night"] .af-infra__card { background-image: linear-gradient(231deg, var(--n-surface), var(--n-bg-2) 51%); border-color: var(--n-line-2); }
html[data-look="night"] .af-infra__copy p { color: var(--n-body); }

/* ================================================================ without / with Agent Frank */

html[data-look="night"] .cmp__panel { background: var(--n-bg-2); box-shadow: inset 0 0 0 1px var(--n-line); }
html[data-look="night"] .cmp__pill { background: rgba(255, 255, 255, .05); border-color: var(--n-line-2); color: #dcdce6; }
html[data-look="night"] .cmp__pill--with,
html[data-look="night"] .cmp__badge { background: rgba(143, 99, 246, .16); border-color: rgba(183, 164, 255, .3); color: var(--n-violet-text); }
html[data-look="night"] .cmp__item { background: var(--n-surface); border-color: rgba(255, 255, 255, .16); box-shadow: none; }
html[data-look="night"] .cmp__item--solid { border-color: var(--n-line-2); }
html[data-look="night"] .cmp__card { background: var(--n-surface); border-color: var(--n-line-2); box-shadow: 0 24px 60px -24px rgba(0, 0, 0, .7); }
/* the small violet icons: lifted to light violet on a violet glass square */
html[data-look="night"] .cmp__icon { background: rgba(143, 99, 246, .16); border-color: rgba(143, 99, 246, .08); }
html[data-look="night"] .cmp__icon img { filter: invert(1) hue-rotate(180deg); }
/* timeline markers: as in day the white tick only shows once the marker has turned violet */
html[data-look="night"] .cmp__dot { background: var(--n-surface); border-color: rgba(255, 255, 255, .22); }
html[data-look="night"] .cmp__dot img { opacity: 0; transition: opacity .3s; }
html[data-look="night"] .cmp__mark.is-on .cmp__dot {
  background: var(--n-violet); border-color: rgba(183, 164, 255, .55);
  box-shadow: 0 0 0 4px rgba(143, 99, 246, .16), 0 6px 18px -4px rgba(143, 99, 246, .8);
}
html[data-look="night"] .cmp__mark.is-on .cmp__dot img { opacity: 1; }
/* the timeline line: its fades follow the panel colour */
html[data-look="night"] .cmp__line-fade { background-image: linear-gradient(180deg, var(--n-bg-2), rgba(16, 17, 25, 0)); }
html[data-look="night"] .cmp__line-fill { background-image: linear-gradient(0deg, var(--n-violet-2), var(--n-bg-2)); }
html[data-look="night"] .cmp__line-track { background: rgba(255, 255, 255, .04); border-color: var(--n-line-2); }
html[data-look="night"] .cmp__line-end { background: var(--n-bg-2); }
/* the grey dot field beside the timeline: quieter */
html[data-look="night"] .cmp__pattern { opacity: .3; }

/* ================================================================ pricing per Active Contact */

/* the violet card stays violet, with a soft glow under it */
html[data-look="night"] .afpc-card { box-shadow: 0 0 0 1px rgba(183, 164, 255, .2), 0 40px 100px -40px rgba(143, 99, 246, .6); }
/* the calculator: a dark screen set into the violet card */
html[data-look="night"] .afpc-calc { background: var(--n-bg); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06); }
html[data-look="night"] .afpc-tabs { background: rgba(255, 255, 255, .04); box-shadow: inset 0 0 0 1px var(--n-line); }
html[data-look="night"] .afpc-tab { color: var(--n-muted); }
html[data-look="night"] .afpc-tab:hover { color: var(--n-ink); }
html[data-look="night"] .afpc-tab.is-active {
  background: var(--n-surface-2); color: var(--n-ink);
  box-shadow: inset 0 0 0 1px var(--n-line-2), 0 6px 16px -8px rgba(0, 0, 0, .8);
}
html[data-look="night"] .afpc-tier { background: rgba(143, 99, 246, .16); color: var(--n-violet-text); }
html[data-look="night"] .afpc-slider__label { color: var(--n-body); }
html[data-look="night"] .afpc-slider__ends { color: var(--n-muted); }
/* the range: a visible track and a light thumb with a violet edge */
html[data-look="night"] .afpc-range,
html[data-look="night"] .afpc-range::-webkit-slider-runnable-track { background: rgba(255, 255, 255, .12); }
html[data-look="night"] .afpc-range::-moz-range-track { background: rgba(255, 255, 255, .12); }
html[data-look="night"] .afpc-range::-webkit-slider-thumb {
  background: var(--n-ink); border-color: var(--n-violet-2); box-shadow: 0 0 0 4px rgba(143, 99, 246, .18), 0 4px 12px rgba(0, 0, 0, .5);
}
html[data-look="night"] .afpc-range::-moz-range-thumb {
  background: var(--n-ink); border-color: var(--n-violet-2); box-shadow: 0 0 0 4px rgba(143, 99, 246, .18), 0 4px 12px rgba(0, 0, 0, .5);
}
html[data-look="night"] .afpc-range:focus-visible::-webkit-slider-thumb { background: #e9d7fe; box-shadow: 0 0 0 5px rgba(143, 99, 246, .45); }
html[data-look="night"] .afpc-range:focus-visible::-moz-range-thumb { background: #e9d7fe; box-shadow: 0 0 0 5px rgba(143, 99, 246, .45); }
/* the total: violet glass */
html[data-look="night"] .afpc-total { background: rgba(143, 99, 246, .1); box-shadow: inset 0 0 0 1px rgba(183, 164, 255, .16); }
html[data-look="night"] .afpc-total__period { color: var(--n-muted); }

/* ================================================================ wall of LinkedIn chats */

/* the chat screenshots stay as they are; a hairline and a deep shadow seat them on the dark page */
html[data-look="night"] .af-wall__card { box-shadow: 0 0 0 1px rgba(255, 255, 255, .06), 0 24px 60px -28px rgba(0, 0, 0, .8); }
/* the fade over the closed wall runs from clear page colour (not clear white) to the page */
html[data-look="night"] .af-wall__more { background-image: linear-gradient(rgba(11, 12, 17, 0), rgba(11, 12, 17, .8) 60%, var(--n-bg) 85%); }
/* "More" */
html[data-look="night"] .btn-sec {
  background: var(--n-surface); border-color: var(--n-line-2); color: var(--n-ink); box-shadow: 0 8px 24px -8px rgba(0, 0, 0, .8);
}
html[data-look="night"] .btn-sec:hover { background: var(--n-surface-2); border-color: rgba(255, 255, 255, .22); color: #fff; }

/* ================================================================ savings */

html[data-look="night"] .afsc-card { background: var(--n-surface); border-color: var(--n-line-2); box-shadow: 0 24px 60px -24px rgba(0, 0, 0, .7); }
html[data-look="night"] .afsc-card__rule { background: var(--n-line); }
html[data-look="night"] .afsc-card__per { color: var(--n-muted); }
/* the sliders: a visible track, a violet fill and a light handle with a violet edge */
html[data-look="night"] .afsc-slider__track { background: rgba(255, 255, 255, .12); }
html[data-look="night"] .afsc-slider__fill { background: linear-gradient(90deg, var(--n-violet), var(--n-violet-2)); }
html[data-look="night"] .afsc-slider__handle {
  background: var(--n-ink); border-color: var(--n-violet-2); box-shadow: 0 0 0 4px rgba(143, 99, 246, .18), 0 4px 12px rgba(0, 0, 0, .5);
}
html[data-look="night"] .afsc-slider__handle:focus-visible { background: #e9d7fe; box-shadow: 0 0 0 5px rgba(143, 99, 246, .45); }

/* ================================================================ questions */

/* the plus signs were dark grey on near-black */
html[data-look="night"] .pfaq__plus::before,
html[data-look="night"] .pfaq__plus::after { background: var(--n-muted); }
@media (min-width: 992px) {
  html[data-look="night"] .pfaq__q:hover .pfaq__plus::before,
  html[data-look="night"] .pfaq__q:hover .pfaq__plus::after { background: var(--n-violet-text); }
}
html[data-look="night"] .pfaq__grow { background: var(--n-violet-2); }
html[data-look="night"] .pfaq__a-inner p { color: var(--n-body); }
