/* ══════════════════════════════════════════════════════════════════
   DYGISTIC · NEWFOLD (nfd-*) COMPATIBILITY LAYER
   Split out of style.css in 1.6.7. functions.php only loads this file
   where nfd-* classes are used: the blog index (page 160), Contact
   (page 1181) and any post or page whose content contains "nfd-"
   (filter: dygistic_needs_newfold).
   It loads BEFORE style.css on purpose: that is where these rules sat
   in the cascade before (near the top of style.css), so moving them
   changes nothing on screen.
   Delete this file and its enqueue once blog and contact are rebuilt.
   ══════════════════════════════════════════════════════════════════ */

/* The HostGator / Newfold plugin injected Wonder Block patterns into
   pages with a wide utility-class vocabulary: nfd-theme-*, nfd-text-*,
   nfd-gap-*, nfd-p-*, nfd-rounded, nfd-container, nfd-btn, etc. With
   that plugin disabled those classes are inert, so this file
   re-defines the essentials with our own brand tokens. */

/* ── Theme variants (background + default text) ──────────────────── */
.nfd-theme-dark,
.is-style-nfd-theme-dark {
  --nfd-surface: var(--dy-slate);
  --nfd-contrast: var(--dy-white);
  --nfd-faded:    rgba(255,255,255,0.72);
  --nfd-primary:  var(--dy-sky-soft);
  --nfd-border:   rgba(255,255,255,0.10);
  background-color: var(--nfd-surface);
  color: var(--nfd-contrast);
}
.nfd-theme-darker,
.is-style-nfd-theme-darker {
  --nfd-surface: var(--dy-slate-ink);
  --nfd-contrast: var(--dy-white);
  --nfd-faded:    rgba(255,255,255,0.72);
  --nfd-primary:  var(--dy-sky-soft);
  --nfd-border:   rgba(255,255,255,0.08);
  background-color: var(--nfd-surface);
  color: var(--nfd-contrast);
}
.nfd-theme-white,
.is-style-nfd-theme-white {
  --nfd-surface: var(--dy-white);
  --nfd-contrast: var(--dy-slate);
  --nfd-faded:    var(--dy-ink-70);
  --nfd-primary:  var(--dy-sky-deep);
  --nfd-border:   var(--dy-rule);
  background-color: var(--nfd-surface);
  color: var(--nfd-contrast);
}
/* nfd-bg-surface uses the theme's surface colour */
.nfd-bg-surface { background-color: var(--nfd-surface, transparent); }
.nfd-bg-subtle  { background-color: rgba(255,255,255,0.08); }

/* ── Text utility classes ───────────────────────────────────────── */
.nfd-text-contrast { color: var(--nfd-contrast, var(--dy-slate)); }
.nfd-text-faded    { color: var(--nfd-faded,    var(--dy-ink-70)); }
.nfd-text-primary  { color: var(--nfd-primary,  var(--dy-sky-deep)); }

/* Text sizes */
.nfd-text-xs    { font-size: 11px;  line-height: 1.5; letter-spacing: 0.04em; }
.nfd-text-sm    { font-size: 13px;  line-height: 1.55; }
.nfd-text-base  { font-size: 15px;  line-height: 1.6; }
.nfd-text-md    { font-size: 17px;  line-height: 1.55; }
.nfd-text-lg    { font-size: 20px;  line-height: 1.35; font-weight: 700; letter-spacing: -0.01em; }
.nfd-text-xl    { font-size: clamp(26px, 3vw, 34px);  line-height: 1.15; letter-spacing: -0.02em; font-weight: 700; }
.nfd-text-2xl   { font-size: clamp(32px, 3.6vw, 42px); line-height: 1.1; letter-spacing: -0.022em; font-weight: 700; }
.nfd-text-giga  { font-size: clamp(40px, 5.5vw, 72px); line-height: 1.02; letter-spacing: -0.035em; font-weight: 800; }

.nfd-text-balance { text-wrap: balance; }

/* ── Gap utilities (used on flex / grid wrappers) ───────────────── */
.nfd-gap-xs   { gap: var(--dy-sp-2); }
.nfd-gap-sm   { gap: 12px; }
.nfd-gap-md   { gap: var(--dy-sp-3); }
.nfd-gap-lg   { gap: var(--dy-sp-4); }
.nfd-gap-xl   { gap: var(--dy-sp-5); }
.nfd-gap-2xl  { gap: var(--dy-sp-6); }
.nfd-gap-3xl  { gap: var(--dy-sp-7); }
.nfd-gap-4xl  { gap: var(--dy-sp-8); }
.nfd-gap-y-2xl { row-gap: var(--dy-sp-6); }

/* ── Padding utilities ──────────────────────────────────────────── */
.nfd-p-xs  { padding: var(--dy-sp-2); }
.nfd-p-sm  { padding: 12px; }
.nfd-p-md  { padding: var(--dy-sp-3); }
.nfd-p-lg  { padding: var(--dy-sp-5); }
.nfd-p-xl  { padding: var(--dy-sp-6); }
.nfd-p-2xl { padding: var(--dy-sp-7); }
.nfd-pt-lg { padding-top: var(--dy-sp-5); }
.nfd-pt-xl { padding-top: var(--dy-sp-6); }
.nfd-pb-lg { padding-bottom: var(--dy-sp-5); }
.nfd-p-card-md,
.nfd-p-card-lg {
  padding: clamp(var(--dy-sp-4), 3vw, var(--dy-sp-5));
}

/* ── Rounded corners ────────────────────────────────────────────── */
.nfd-rounded       { border-radius: var(--dy-radius); }
.nfd-rounded-full  { border-radius: 999px; }
.nfd-rounded-t-xl  { border-top-left-radius: 18px; border-top-right-radius: 18px; }
.nfd-rounded-b-xl  { border-bottom-left-radius: 18px; border-bottom-right-radius: 18px; }

/* ── Shadows & borders ──────────────────────────────────────────── */
.nfd-shadow-xs { box-shadow: var(--dy-shadow-sm); }
.nfd-shadow-md { box-shadow: var(--dy-shadow-md); }
.nfd-border-bg { border: 1px solid var(--nfd-border, var(--dy-rule)); }

/* ── Container (max-width content wrapper) ──────────────────────── */
.nfd-container {
  max-width: var(--dy-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--dy-pad);
  padding-right: var(--dy-pad);
}

/* ── Grid utilities (simplified, covers common hero layouts) ───── */
.nfd-grid          { display: grid; }
.nfd-grid-cols-9   { grid-template-columns: repeat(9, minmax(0, 1fr)); }
.nfd-grid-cols-12  { grid-template-columns: repeat(12, minmax(0, 1fr)); }
.nfd-grid-rows-1   { grid-template-rows: 1fr; }
.nfd-col-start-1   { grid-column-start: 1; }
.nfd-col-start-5   { grid-column-start: 5; }
.nfd-col-start-7   { grid-column-start: 7; }
.nfd-col-end-13    { grid-column-end: 13; }
.nfd-row-start-1   { grid-row-start: 1; }
.nfd-items-center  { align-items: center; }

/* ── Responsive order helpers ───────────────────────────────────── */
@media (min-width: 768px) {
  .md\:nfd-order-1 { order: 1; }
  .md\:nfd-order-2 { order: 2; }
  .md\:nfd-order-3 { order: 3; }
}

/* ── Buttons ────────────────────────────────────────────────────── */
.nfd-btn,
.nfd-btn-lg,
.nfd-btn-xl {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--dy-btn-bg);
  color: var(--dy-white);
  font-weight: 600;
  border-radius: var(--dy-radius-sm);
  text-decoration: none;
  transition: background .2s ease, box-shadow .2s ease, transform .15s ease;
}
.nfd-btn    { padding: 10px 20px; font-size: 14px; }
.nfd-btn-lg { padding: 13px 24px; font-size: 15px; }
.nfd-btn-xl { padding: 15px 28px; font-size: 16px; }
.nfd-btn:hover,
.nfd-btn-lg:hover,
.nfd-btn-xl:hover {
  background: var(--dy-btn-bg-hover);
  box-shadow: 0 8px 24px rgba(74, 144, 184, 0.3);
}
.nfd-btn:active { transform: translateY(1px); }

/* ── Decorative background grid (hero effect) ───────────────────── */
.nfd-bg-effect-grid,
.nfd-bg-effect-grid-2 {
  position: relative;
  overflow: hidden;
}
.nfd-bg-effect-grid::before,
.nfd-bg-effect-grid-2::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right,  rgba(255,255,255,0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at center, black 40%, transparent 90%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 40%, transparent 90%);
  opacity: 0.7;
  z-index: 0;
}
.nfd-bg-effect-grid > *,
.nfd-bg-effect-grid-2 > * { position: relative; z-index: 1; }

/* Light-theme variant of the grid effect: darker lines on white */
.nfd-theme-white .nfd-bg-effect-grid::before,
.nfd-theme-white .nfd-bg-effect-grid-2::before,
.is-style-nfd-theme-white .nfd-bg-effect-grid::before,
.is-style-nfd-theme-white .nfd-bg-effect-grid-2::before {
  background-image:
    linear-gradient(to right,  rgba(28,35,51,0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(28,35,51,0.04) 1px, transparent 1px);
}

/* ── Animations (fade-in-bottom) ────────────────────────────────── */
.nfd-wb-animate {
  opacity: 0;
  transform: translateY(20px);
  animation: nfdFadeUp .7s ease forwards;
}
.nfd-wb-fade-in-bottom-short { animation-name: nfdFadeUp; }
.nfd-delay-100  { animation-delay: .1s; }
.nfd-delay-200  { animation-delay: .2s; }
.nfd-delay-300  { animation-delay: .3s; }
.nfd-delay-400  { animation-delay: .4s; }
.nfd-delay-500  { animation-delay: .5s; }
.nfd-delay-600  { animation-delay: .6s; }
@keyframes nfdFadeUp {
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .nfd-wb-animate { opacity: 1; transform: none; animation: none; }
}


/* ── Dark-context rules for the Newfold dark themes ───────────────
   Same rules as the DARK-CONTEXT section in style.css, for the
   nfd-theme-dark / -darker classes. */

.nfd-theme-dark,
.nfd-theme-darker,
.is-style-nfd-theme-dark,
.is-style-nfd-theme-darker {
  color: var(--dy-white);
}

.nfd-theme-dark :is(h1,h2,h3,h4,h5,h6,p,li,strong,em),
.nfd-theme-darker :is(h1,h2,h3,h4,h5,h6,p,li,strong,em),
.is-style-nfd-theme-dark :is(h1,h2,h3,h4,h5,h6,p,li,strong,em),
.is-style-nfd-theme-darker :is(h1,h2,h3,h4,h5,h6,p,li,strong,em) {
  color: inherit;
}

/* Newfold utility text colours: explicit mapping so they survive our rules */
.nfd-theme-dark .nfd-text-contrast,
.nfd-theme-darker .nfd-text-contrast,
.is-style-nfd-theme-dark .nfd-text-contrast,
.is-style-nfd-theme-darker .nfd-text-contrast { color: var(--dy-white) !important; }

.nfd-theme-dark .nfd-text-faded,
.nfd-theme-darker .nfd-text-faded,
.is-style-nfd-theme-dark .nfd-text-faded,
.is-style-nfd-theme-darker .nfd-text-faded { color: rgba(255, 255, 255, 0.7) !important; }

.nfd-theme-dark .nfd-text-primary,
.nfd-theme-darker .nfd-text-primary,
.is-style-nfd-theme-dark .nfd-text-primary,
.is-style-nfd-theme-darker .nfd-text-primary { color: var(--dy-sky-soft) !important; }

/* On a white Newfold theme, keep the text readable dark */
.nfd-theme-white .nfd-text-contrast,
.is-style-nfd-theme-white .nfd-text-contrast { color: var(--dy-slate) !important; }
.nfd-theme-white .nfd-text-faded,
.is-style-nfd-theme-white .nfd-text-faded { color: var(--dy-ink-70) !important; }
.nfd-theme-white .nfd-text-primary,
.is-style-nfd-theme-white .nfd-text-primary { color: var(--dy-sky-deep) !important; }

/* Newfold "pricing table" card surface: restyle to match our card grammar */
.is-style-nfd-theme-dark.wp-block-group,
.is-style-nfd-theme-darker.wp-block-group {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.09) !important;
  transition: background .2s ease, border-color .2s ease, transform .2s ease;
}
.is-style-nfd-theme-dark.wp-block-group:hover,
.is-style-nfd-theme-darker.wp-block-group:hover {
  background: rgba(74, 144, 184, 0.08);
  border-color: rgba(74, 144, 184, 0.35) !important;
  transform: translateY(-2px);
}

/* Make the big dark hero / section backgrounds use brand slate
   (don't override inline background-image on cover blocks) */
.nfd-theme-dark.nfd-bg-surface,
.is-style-nfd-theme-dark.nfd-bg-surface {
  background-color: var(--dy-slate) !important;
}
.nfd-theme-darker.nfd-bg-surface,
.is-style-nfd-theme-darker.nfd-bg-surface {
  background-color: var(--dy-slate-ink) !important;
}

.nfd-theme-dark a,
.nfd-theme-darker a,
.is-style-nfd-theme-dark a,
.is-style-nfd-theme-darker a {
  color: var(--dy-sky-soft);
  border-bottom-color: rgba(122,180,214,.35);
}

.nfd-theme-dark a:hover,
.nfd-theme-darker a:hover { color: var(--dy-white); }

.nfd-theme-dark .wp-block-button__link,
.nfd-theme-darker .wp-block-button__link,
.is-style-nfd-theme-dark .wp-block-button__link,
.is-style-nfd-theme-darker .wp-block-button__link {
  color: var(--dy-white) !important;
  background: var(--dy-btn-bg) !important;
}
