:root {
  --nbk-sage: #699273;
  --nbk-forest: #274232;
  --nbk-cream: #fffaf1;
  --nbk-paper: #f8f0e2;
  --nbk-linen: #eadcc8;
  --nbk-ink: #253228;
  --nbk-muted: #59665b;
  --nbk-line: rgba(39, 66, 50, 0.18);
  --nbk-shadow: 0 24px 70px rgba(31, 48, 39, 0.16);
  --nbk-radius: 10px;
  --nbk-pill: 999px;
}

html {
  scroll-behavior: smooth;
}

body {
  overflow-x: hidden;
}

body,
button,
input,
textarea,
select {
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a,
button,
input,
.wp-element-button {
  transition: color 180ms ease, background-color 180ms ease, border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

a:hover {
  color: var(--nbk-sage);
}

:where(a, button, input, textarea, select, [tabindex]):focus-visible {
  outline: 3px solid #f4dca8;
  outline-offset: 4px;
}

img,
video {
  display: block;
  max-width: 100%;
}

.wp-site-blocks {
  padding: 0;
}

.wp-block-button__link,
.wp-element-button {
  box-shadow: 0 8px 24px rgba(39, 66, 50, 0.14);
}

.wp-block-button__link:hover,
.wp-element-button:hover {
  background: var(--nbk-forest);
  color: #fff;
  transform: translateY(-2px);
}

.wp-block-button.is-style-outline .wp-block-button__link {
  border: 1px solid currentColor;
  box-shadow: none;
}

.wp-block-button.is-style-outline .wp-block-button__link:hover {
  background: rgba(255, 250, 241, 0.12);
  color: var(--nbk-cream);
}

.nbk-eyebrow,
p.nbk-eyebrow {
  margin-block: 0 0.8rem;
  color: var(--nbk-sage);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.145em;
  line-height: 1.45;
  text-transform: uppercase;
}

.has-forest-background-color .nbk-eyebrow,
.has-sage-background-color .nbk-eyebrow {
  color: var(--nbk-cream);
  opacity: 0.82;
}

/* Hero: the real organizing work is the thesis; video remains a quiet backdrop. */
.nbk-hero {
  position: relative;
  display: grid;
  min-height: clamp(640px, 78vh, 860px);
  margin: 0;
  isolation: isolate;
  overflow: hidden;
}

.nbk-hero::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(24, 43, 31, 0.91) 0%, rgba(28, 49, 36, 0.72) 47%, rgba(28, 49, 36, 0.24) 78%, rgba(28, 49, 36, 0.4) 100%),
    linear-gradient(180deg, rgba(39, 66, 50, 0.08), rgba(24, 43, 31, 0.46));
  content: "";
}

.nbk-hero-media {
  position: absolute;
  z-index: -2;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
}

.nbk-hero-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 58% 50%;
}

.nbk-hero-content {
  position: relative;
  width: 100%;
  margin-block: auto;
  padding-block: clamp(4.5rem, 8vw, 7rem) clamp(3.5rem, 5vw, 5rem);
}

.nbk-hero-content h1 {
  max-width: 17ch;
  margin-block: 0;
  font-size: clamp(2.8rem, 4.8vw, 4.8rem) !important;
  text-wrap: balance;
}

.nbk-hero-copy {
  max-width: 640px;
  margin-top: 1.5rem;
  color: rgba(255, 250, 241, 0.88);
  line-height: 1.55;
}

.nbk-actions {
  gap: 0.8rem;
  margin-top: 1.8rem;
}

.nbk-proof-grid {
  max-width: 980px;
  margin-top: clamp(2.8rem, 6vw, 5.5rem);
  gap: 0;
  border-top: 1px solid rgba(255, 250, 241, 0.32);
  border-bottom: 1px solid rgba(255, 250, 241, 0.2);
}

.nbk-proof-grid .wp-block-column {
  padding: 1.15rem clamp(0.8rem, 2vw, 1.5rem);
  border-left: 1px solid rgba(255, 250, 241, 0.22);
}

.nbk-proof-grid .wp-block-column:first-child {
  padding-left: 0;
  border-left: 0;
}

.nbk-proof-grid p {
  margin: 0;
  color: rgba(255, 250, 241, 0.74);
  font-size: 0.82rem;
  line-height: 1.5;
}

.nbk-proof-grid strong {
  color: var(--nbk-cream);
}

/* Sections use aligned folios and labeled divisions instead of floating cards. */
.nbk-section {
  margin: 0;
  padding-block: clamp(4.5rem, 8vw, 8.5rem);
}

.nbk-section-heading {
  margin-right: auto;
  margin-bottom: clamp(2.5rem, 5vw, 4.5rem);
}

.nbk-section-heading h2,
.nbk-transformation-copy h2 {
  margin-block: 0;
  text-wrap: balance;
}

.nbk-service-grid {
  gap: 1px;
  padding: 1px;
  border: 1px solid rgba(39, 66, 50, 0.14);
  background: rgba(39, 66, 50, 0.15);
  box-shadow: 0 22px 60px rgba(31, 48, 39, 0.08);
}

.nbk-service-card {
  position: relative;
  margin: 0;
  padding: clamp(1.25rem, 2.3vw, 2.1rem);
  background: var(--nbk-cream);
}

.nbk-service-card::before {
  position: absolute;
  top: -1px;
  left: clamp(1.25rem, 2.3vw, 2.1rem);
  width: 42%;
  height: 5px;
  background: var(--nbk-sage);
  content: "";
}

.nbk-service-card:nth-child(2)::before {
  width: 56%;
  background: #8aa384;
}

.nbk-service-card:nth-child(3)::before {
  width: 34%;
  background: #b7a785;
}

.nbk-service-card .wp-block-image {
  aspect-ratio: 1;
  margin-bottom: 1.4rem;
  overflow: hidden;
}

.nbk-service-card .wp-block-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 420ms cubic-bezier(0.2, 0.65, 0.3, 1);
}

.nbk-service-card:hover .wp-block-image img {
  transform: scale(1.025);
}

.nbk-card-label {
  margin-bottom: 0.35rem;
  color: var(--nbk-muted);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.nbk-service-card h3,
.nbk-service-card p {
  margin-top: 0;
}

.nbk-service-card h3 {
  margin-bottom: 0.75rem;
}

.nbk-service-card p:last-child {
  margin: 1.4rem 0 0;
}

.nbk-service-card p:last-child a {
  display: inline-block;
  border-bottom: 1px solid rgba(39, 66, 50, 0.35);
}

.is-style-neatly-paper-panel {
  padding: clamp(1.2rem, 2vw, 2rem);
  border: 1px solid var(--nbk-line);
  border-radius: var(--nbk-radius);
  background: var(--nbk-paper);
  box-shadow: 0 16px 38px rgba(31, 48, 39, 0.07);
}

.is-style-neatly-organized-frame {
  overflow: hidden;
  border: 1px solid rgba(39, 66, 50, 0.15);
  border-radius: calc(var(--nbk-radius) - 2px);
  background: var(--nbk-linen);
}

/* Before/after: one direct, useful interaction that demonstrates transformation. */
.nbk-transformation {
  background:
    linear-gradient(90deg, transparent 0 49.96%, rgba(39, 66, 50, 0.09) 49.96% 50.04%, transparent 50.04%);
}

.nbk-transformation-grid {
  gap: clamp(2.5rem, 6vw, 6.5rem);
}

.nbk-compare {
  --nbk-position: 50%;
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border: 1px solid rgba(39, 66, 50, 0.2);
  border-radius: var(--nbk-radius);
  background: var(--nbk-linen);
  box-shadow: var(--nbk-shadow);
  touch-action: pan-y;
}

.nbk-compare > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.nbk-compare > .nbk-compare-after {
  clip-path: inset(0 0 0 var(--nbk-position));
}

.nbk-compare-line {
  position: absolute;
  z-index: 3;
  top: 0;
  bottom: 0;
  left: var(--nbk-position);
  width: 2px;
  background: var(--nbk-cream);
  box-shadow: 0 0 0 1px rgba(39, 66, 50, 0.25);
  transform: translateX(-1px);
}

.nbk-compare-handle {
  position: absolute;
  z-index: 4;
  top: 50%;
  left: var(--nbk-position);
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border: 1px solid rgba(39, 66, 50, 0.25);
  border-radius: 50%;
  background: var(--nbk-cream);
  color: var(--nbk-forest);
  box-shadow: 0 8px 22px rgba(31, 48, 39, 0.25);
  font-size: 1rem;
  transform: translate(-50%, -50%);
}

.nbk-compare input[type="range"] {
  position: absolute;
  z-index: 5;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: ew-resize;
}

.nbk-compare-label {
  position: absolute;
  z-index: 4;
  top: 1rem;
  padding: 0.45rem 0.7rem;
  border: 1px solid rgba(39, 66, 50, 0.16);
  border-radius: var(--nbk-pill);
  background: rgba(255, 250, 241, 0.91);
  color: var(--nbk-forest);
  font-size: 0.68rem;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  backdrop-filter: blur(8px);
}

.nbk-compare-label.nbk-before { left: 1rem; }
.nbk-compare-label.nbk-after { right: 1rem; }

.nbk-transformation-copy {
  max-width: 560px;
}

.nbk-transformation-copy > * + * {
  margin-top: 1.2rem;
}

/* Client notes form a controlled carousel only when JavaScript is available. */
.nbk-testimonial-gallery {
  position: relative;
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: center;
  gap: clamp(0.9rem, 2vw, 1.8rem) !important;
}

.nbk-testimonial-gallery .wp-block-image {
  width: 100% !important;
  aspect-ratio: 3 / 4;
  margin: 0 !important;
  overflow: hidden;
  border: 1px solid var(--nbk-line);
  border-radius: var(--nbk-radius);
  background: var(--nbk-cream);
  box-shadow: 0 12px 34px rgba(31, 48, 39, 0.09);
  opacity: 0.78;
  transform: scale(0.94);
  transition: opacity 260ms ease, transform 320ms cubic-bezier(0.2, 0.7, 0.3, 1), box-shadow 260ms ease;
  cursor: pointer;
}

.nbk-testimonial-gallery .wp-block-image.is-active,
.nbk-testimonial-gallery .wp-block-image:nth-child(2):not(.nbk-carousel-ready *) {
  z-index: 2;
  box-shadow: 0 26px 64px rgba(31, 48, 39, 0.18);
  opacity: 1;
  transform: scale(1);
}

.nbk-testimonial-gallery img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover;
}

.nbk-carousel-controls {
  display: flex;
  justify-content: center;
  gap: 0.6rem;
  margin-top: 2rem;
}

.nbk-carousel-controls button {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid rgba(39, 66, 50, 0.26);
  border-radius: 50%;
  background: var(--nbk-cream);
  color: var(--nbk-forest);
  font: inherit;
  cursor: pointer;
}

.nbk-carousel-controls button:hover {
  border-color: var(--nbk-forest);
  background: var(--nbk-forest);
  color: var(--nbk-cream);
}

/* Consultation and footer. */
.nbk-consultation {
  position: relative;
  margin: 0;
  padding-block: clamp(4.25rem, 7vw, 7rem);
  overflow: hidden;
}

.nbk-consultation::after {
  position: absolute;
  right: -7vw;
  bottom: -9rem;
  width: min(34vw, 420px);
  aspect-ratio: 1.7;
  border: 1px solid rgba(255, 250, 241, 0.28);
  border-radius: 14px 14px 0 0;
  box-shadow:
    0 -26px 0 -1px rgba(255, 250, 241, 0.07),
    0 -52px 0 -1px rgba(255, 250, 241, 0.05);
  content: "";
  transform: rotate(-5deg);
}

.nbk-consultation .wp-block-columns {
  position: relative;
  z-index: 1;
  gap: clamp(2rem, 5vw, 5rem);
}

.nbk-consultation h2 {
  margin: 0;
  text-wrap: balance;
}

.nbk-site-footer {
  margin: 0;
  padding-block: clamp(3.5rem, 6vw, 5.5rem) 2rem;
}

.nbk-site-footer .wp-block-site-title a,
.nbk-site-footer a {
  color: inherit;
}

.nbk-site-footer .wp-block-site-title {
  margin: 0 0 0.75rem;
  font-family: "Elms Sans", "Avenir Next", "Segoe UI", sans-serif;
}

.nbk-site-footer .wp-block-separator {
  margin-block: 2.5rem 1.25rem;
  opacity: 0.38;
}

.nbk-footer-links .wp-block-navigation-item__content {
  font-size: 0.82rem;
  font-weight: 700;
}

/* Standard content templates. */
.nbk-singular,
.nbk-archive,
.nbk-empty-state {
  padding-block: clamp(4rem, 8vw, 8rem);
}

/*
 * A Neatly section is its own page-level canvas. Let it break out of the
 * readable article column even when an older page saved the block without an
 * explicit full-width alignment. Plain Gutenberg content stays constrained.
 */
.nbk-singular .wp-block-post-content > :where(.nbk-library-section, .wp-block-neatly-comparison-section) {
  width: 100vw;
  max-width: 100vw;
  margin-inline: calc(50% - 50vw);
}

/*
 * Section-built pages carry their own H1 in the opening hero. Automatically
 * remove the duplicate WordPress title and template spacing while retaining
 * the title on article-style pages such as the privacy policy.
 */
body.page .nbk-singular:has(> .wp-block-post-content > .nbk-library-section:first-child) {
  padding-block: 0;
}

body.page .nbk-singular:has(> .wp-block-post-content > .nbk-library-section:first-child) > :where(.wp-block-post-title, .wp-block-post-featured-image) {
  display: none;
}

.nbk-singular > .wp-block-post-title,
.nbk-archive > .wp-block-query-title,
.nbk-archive > h1 {
  max-width: 14ch;
  margin-bottom: 1.5rem;
  text-wrap: balance;
}

.nbk-singular .wp-block-post-featured-image {
  margin-block: clamp(2rem, 5vw, 4.5rem);
}

.nbk-singular .wp-block-post-content > * + * {
  margin-block-start: 1.3em;
}

.nbk-singular .wp-block-post-content > :where(h2, h3, h4) {
  margin-block-start: 2.2em;
}

.nbk-archive .wp-block-post-template {
  gap: clamp(1.25rem, 2.8vw, 2.5rem);
}

.nbk-empty-state {
  min-height: 65vh;
}

.nbk-empty-state h1 {
  max-width: 11ch;
  text-wrap: balance;
}

@media (max-width: 781px) {
  .nbk-hero {
    min-height: 720px;
  }

  .nbk-hero::before {
    background: linear-gradient(180deg, rgba(24, 43, 31, 0.48), rgba(24, 43, 31, 0.93) 62%, rgba(24, 43, 31, 0.98));
  }

  .nbk-hero-media video {
    object-position: 62% 50%;
  }

  .nbk-hero-content {
    align-self: end;
    padding-block: 9rem 3.2rem;
  }

  .nbk-hero-content h1 {
    max-width: 12ch;
  }

  .nbk-proof-grid {
    display: grid;
    grid-template-columns: 1fr;
    margin-top: 2.5rem;
  }

  .nbk-proof-grid .wp-block-column,
  .nbk-proof-grid .wp-block-column:first-child {
    padding: 0.8rem 0;
    border-top: 1px solid rgba(255, 250, 241, 0.18);
    border-left: 0;
  }

  .nbk-proof-grid .wp-block-column:first-child {
    border-top: 0;
  }

  .nbk-service-grid {
    display: grid;
  }

  .nbk-service-card {
    flex-basis: 100% !important;
  }

  .nbk-transformation {
    background: var(--nbk-cream);
  }

  .nbk-transformation-grid {
    gap: 2.6rem;
  }

  .nbk-compare {
    aspect-ratio: 4 / 5;
  }

  .nbk-testimonial-gallery {
    grid-template-columns: 12% 76% 12%;
    gap: 0.5rem !important;
    margin-inline: -1rem;
    overflow: hidden;
  }

  .nbk-testimonial-gallery .wp-block-image {
    min-width: 0;
  }

  .nbk-testimonial-gallery .wp-block-image:not(.is-active) {
    opacity: 0.4;
  }

  .nbk-consultation .wp-block-buttons,
  .nbk-footer-links .wp-block-navigation__container {
    justify-content: flex-start;
  }

  .nbk-site-footer .wp-block-columns {
    gap: 2rem;
  }
}

@media (max-width: 520px) {
  .nbk-hero {
    min-height: 760px;
  }

  .nbk-hero-content h1 {
    font-size: clamp(2.35rem, 12vw, 3.6rem) !important;
  }

  .nbk-actions .wp-block-button,
  .nbk-actions .wp-block-button__link,
  .nbk-consultation .wp-block-button,
  .nbk-consultation .wp-block-button__link {
    width: 100%;
    text-align: center;
  }

  .nbk-section {
    padding-block: 4.25rem;
  }

  .nbk-service-card {
    padding: 1.15rem;
  }

  .nbk-compare-label {
    top: 0.7rem;
  }

  .nbk-compare-label.nbk-before { left: 0.7rem; }
  .nbk-compare-label.nbk-after { right: 0.7rem; }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  .nbk-service-card .wp-block-image img {
    opacity: 1;
    transform: none !important;
  }
}
