/* Northern Flooring — supplementary styles for WordPress-specific structures.
   The design-system tokens + homepage components live in nfs.css (ported verbatim).
   This file styles the chrome WordPress needs that the prototype didn't: page heroes,
   blog/post grids, pagination, comments, header spacer, prose. Uses the same tokens. */

/* Accessibility: skip-link / screen-reader text. */
.screen-reader-text {
	border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%);
	height: 1px; width: 1px; margin: -1px; overflow: hidden; padding: 0;
	position: absolute !important; word-wrap: normal !important;
}
.screen-reader-text:focus {
	background-color: var(--paper); border-radius: 3px;
	box-shadow: 0 0 2px 2px rgba(0,0,0,0.6); clip: auto !important; clip-path: none;
	color: var(--ink); display: block; font-size: 0.875rem; font-weight: 600;
	height: auto; width: auto; left: 5px; top: 5px; line-height: normal;
	padding: 15px 23px 14px; text-decoration: none; z-index: 100000;
}

/* Admin-bar offset for the fixed header. */
.admin-bar .nfs-header { top: 32px; }
@media screen and (max-width: 782px) { .admin-bar .nfs-header { top: 46px; } }
.admin-bar .cfg-overlay { top: 32px; }
@media screen and (max-width: 782px) { .admin-bar .cfg-overlay { top: 46px; } }

/* Header spacer so solid-header (non-front) pages clear the fixed bar.
   Tracks --nfs-header-h (set in nfs.css) so it always matches the real header
   height at every breakpoint — otherwise mobile content clips under the header. */
.nfs-header-spacer { height: var(--nfs-header-h, 92px); }

/* Generic page / single hero */
.nfs-page-hero { padding: 152px 0 32px; }
.nfs-front .nfs-page-hero { padding-top: 56px; }
.nfs-page-hero .eyebrow { display: inline-block; margin-bottom: 16px; }
.nfs-page-hero h1 {
	font-family: "Fraunces", serif; font-weight: 300;
	font-size: clamp(40px, 6vw, 80px); line-height: 1.04;
	letter-spacing: -0.025em; margin: 0; max-width: 18ch;
}
.nfs-page-thumb { margin: 8px auto 40px; }
.nfs-page-thumb img, .img-rounded { border-radius: 4px; width: 100%; height: auto; }
/* The nfs-hero size is a 5:3 crop, but WordPress serves the full file when the original is
   smaller than 2000x1200 — a square photo then rendered as a giant square block. Pin the box to
   the ratio the hero was designed for and let the image crop into it. */
.nfs-page-thumb img { aspect-ratio: 5 / 3; height: auto; object-fit: cover; object-position: center; }

/* ─── Article hero: featured image behind the title ───────────────────────────────
   The photo is a backdrop, not content, so it sits under a scrim heavy enough to keep the
   type legible whatever the image turns out to be — these are client-uploaded job photos of
   pale timber and white walls, so we cannot assume a dark corner to drop text into.

   The contrast budget is set by the gradient's LIGHTEST stop, not its average: the hero grows
   and shrinks with the headline, so text can land anywhere in it. Against the worst case — a
   blown-out white photo giving the scrim no help at all — 0.60 alpha puts solid white at
   4.8:1, past AA for the 11px eyebrow. Every stop is at or above that, so the check holds
   wherever the text ends up. The eyebrow is solid white rather than the usual translucent
   grey for the same reason. The header is already solid on every view except the front page,
   so the fixed nav stays readable over this. */
.nfs-page-hero--image {
	position: relative;
	isolation: isolate;
	display: flex;
	align-items: flex-end;
	min-height: 460px;
	padding-bottom: 48px;
	border-bottom: 0;
	background: var(--ink, #1a1814); /* shows while the photo decodes */
	color: #fff;
}
.nfs-page-hero-bg {
	position: absolute; inset: 0; z-index: 0;
	width: 100%; height: 100%;
	object-fit: cover; object-position: center;
	border-radius: 0;
}
.nfs-page-hero-scrim {
	position: absolute; inset: 0; z-index: 1;
	background: linear-gradient(180deg, rgba(20,18,15,0.64) 0%, rgba(20,18,15,0.60) 38%, rgba(20,18,15,0.82) 100%);
}
.nfs-page-hero--image .nfs-page-hero-content { position: relative; z-index: 2; width: 100%; }
.nfs-page-hero--image h1 { color: #fff; text-shadow: 0 1px 20px rgba(0,0,0,0.32); }
.nfs-page-hero--image .eyebrow { color: #fff; }

@media (max-width: 782px) {
	.nfs-page-hero--image { min-height: 340px; padding-bottom: 32px; }
}

/* Prose / long-form content */
.nfs-prose { max-width: 72ch; padding-bottom: 96px; font-size: 17px; color: var(--ink-soft); line-height: 1.7; }
.nfs-prose > * + * { margin-top: 1.2em; }
.nfs-prose h2 { font-family: "Fraunces", serif; font-weight: 350; font-size: clamp(28px, 3.5vw, 40px); line-height: 1.1; letter-spacing: -0.015em; color: var(--ink); margin-top: 1.8em; }
.nfs-prose h3 { font-family: "Fraunces", serif; font-weight: 400; font-size: 24px; color: var(--ink); margin-top: 1.6em; }
.nfs-prose a:not(.btn) { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.nfs-prose a:not(.btn):hover { color: var(--accent-deep); }
.nfs-prose blockquote {
	border-left: 2px solid var(--accent); padding-left: 24px; margin-left: 0;
	font-family: "Fraunces", serif; font-style: italic; font-size: 22px; color: var(--ink);
}
.nfs-prose img { border-radius: 4px; }
.nfs-prose ul, .nfs-prose ol { padding-left: 1.3em; }
.nfs-prose code { font-family: "JetBrains Mono", monospace; font-size: 0.9em; background: var(--paper); padding: 2px 6px; border-radius: 4px; }

.nfs-tags { margin-top: 32px; display: flex; gap: 8px; flex-wrap: wrap; }
.nfs-tags a {
	font-family: "JetBrains Mono", monospace; font-size: 11px; text-transform: uppercase;
	letter-spacing: 0.06em; color: var(--muted);
	border: 1px solid var(--hairline); border-radius: 999px; padding: 5px 12px;
}
.nfs-tags a:hover { border-color: var(--accent); color: var(--accent); }

/* Post / blog grid */
.nfs-post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
@media (max-width: 960px) { .nfs-post-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .nfs-post-grid { grid-template-columns: 1fr; } }
.nfs-post-card { background: var(--paper); border: 1px solid var(--hairline); border-radius: 4px; overflow: hidden; transition: transform .3s cubic-bezier(.2,.7,.2,1), box-shadow .3s; }
.nfs-post-card:hover { transform: translateY(-3px); box-shadow: 0 18px 40px rgba(20,18,15,0.08); }
.nfs-post-card-link { display: block; color: inherit; }
.nfs-post-card-img { aspect-ratio: 16/10; overflow: hidden; background: var(--clay); }
.nfs-post-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s cubic-bezier(.2,.7,.2,1); }
.nfs-post-card:hover .nfs-post-card-img img { transform: scale(1.05); }
.nfs-post-card-body { padding: 24px; }
.nfs-post-card-body .eyebrow { display: block; margin-bottom: 10px; }
.nfs-post-card-body h3 { font-family: "Fraunces", serif; font-weight: 400; font-size: 22px; letter-spacing: -0.01em; margin: 0 0 8px; line-height: 1.2; }
.nfs-post-card-body p { color: var(--muted); font-size: 14px; margin: 0 0 14px; }
.nfs-readmore { font-size: 13px; color: var(--accent); font-weight: 500; }

/* Pagination */
.nfs-pagination { margin-top: 56px; }
.nfs-pagination .nav-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; }
.nfs-pagination .page-numbers {
	display: inline-flex; align-items: center; justify-content: center;
	min-width: 40px; height: 40px; padding: 0 12px; border-radius: 999px;
	border: 1px solid var(--hairline); color: var(--ink); font-size: 14px;
	transition: background .2s, color .2s, border-color .2s;
}
.nfs-pagination .page-numbers.current { background: var(--accent); color: var(--paper); border-color: var(--accent); }
.nfs-pagination .page-numbers:hover { border-color: var(--accent); }

/* Post navigation (single) */
.post-navigation { margin: 56px 0; padding-top: 32px; border-top: 1px solid var(--hairline); }
.post-navigation .nav-links { display: flex; justify-content: space-between; gap: 24px; font-family: "Fraunces", serif; font-size: 18px; }
.post-navigation a { color: var(--ink); }
.post-navigation a:hover { color: var(--accent); }

/* Comments */
.nfs-comments { max-width: 72ch; padding-bottom: 96px; }
.nfs-comments-title, .nfs-comment-reply-title { font-size: 26px; font-weight: 400; margin: 0 0 24px; }
.nfs-comment-list { list-style: none; padding: 0; margin: 0 0 40px; }
.nfs-comment-list .comment-body { padding: 20px 0; border-bottom: 1px solid var(--hairline); }
.nfs-comment-list .children { list-style: none; padding-left: 32px; }
.nfs-comments .comment-form input[type=text],
.nfs-comments .comment-form input[type=email],
.nfs-comments .comment-form input[type=url],
.nfs-comments .comment-form textarea {
	width: 100%; background: var(--paper); border: 1px solid var(--hairline);
	border-radius: 8px; padding: 12px 14px; font-family: inherit; font-size: 15px;
	margin-bottom: 12px; color: var(--ink);
}
.nfs-comments .comment-form textarea:focus,
.nfs-comments .comment-form input:focus { outline: none; border-color: var(--accent); }

/* Search form */
.search-form { display: flex; gap: 8px; }
.search-form .search-field {
	background: var(--paper); border: 1px solid var(--hairline);
	border-radius: 999px; padding: 12px 18px; font-family: inherit; font-size: 15px;
	min-width: 220px; color: var(--ink);
}
.search-form .search-field:focus { outline: none; border-color: var(--accent); }
.search-form .search-submit {
	border: 0; border-radius: 999px; background: var(--accent); color: var(--paper);
	padding: 0 22px; height: 46px; font-size: 14px; font-weight: 500; cursor: pointer;
}
.search-form .search-submit:hover { background: var(--accent-deep); }

/* 404 / utility */
.nfs-404 { padding-top: 152px; }

/* Mobile: clear the shorter phone header without wasting the first screen. */
@media (max-width: 720px) {
	.nfs-page-hero { padding-top: 104px; }
	.nfs-front .nfs-page-hero { padding-top: 40px; }
	.nfs-404 { padding-top: 104px; }
}

/* Contact launcher: the [hidden] options menu must not reserve layout / catch clicks.
   (Author .cl-options{display:flex} would otherwise beat the UA [hidden] rule.) */
.cl-widget .cl-options[hidden] { display: none !important; }

/* ───────── Page builder: generic sections ───────── */

/* Prose section */
.nfs-section-prose .nfs-prose { max-width: 72ch; }

/* Media + text section */
.nfs-section-media-text .nfs-media-text-grid {
	display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 72px); align-items: center;
}
.nfs-section-media-text.is-flipped .nfs-media-text-media { order: 2; }
.nfs-section-media-text .nfs-media-text-media .img-ph { width: 100%; }
.nfs-section-media-text .nfs-media-text-body .eyebrow { display: block; margin-bottom: 16px; }
.nfs-section-media-text .nfs-media-text-body h2 {
	font-family: var(--wp--preset--font-family--fraunces, Fraunces, serif); font-weight: 300;
	font-size: clamp(28px, 3.4vw, 44px); line-height: 1.08; letter-spacing: -0.02em; margin: 0 0 18px;
}
.nfs-section-media-text .nfs-media-text-cta { margin-top: 28px; }
@media (max-width: 780px) {
	.nfs-section-media-text .nfs-media-text-grid { grid-template-columns: 1fr; }
	.nfs-section-media-text.is-flipped .nfs-media-text-media { order: 0; }
}

/* Configurator: results loading state */
.cfg-loading { padding: 0 0 64px; }
.cfg-loading .cfg-result-head { text-align: center; }
.cfg-loading h1 { opacity: 0.85; }

/* Skeleton result cards — mirror .cfg-product's geometry so the real matches drop straight into
   the same boxes with no layout shift. */
.cfg-skel-grid { margin-top: 8px; }
.cfg-skel { pointer-events: none; }
.cfg-skel .room { overflow: hidden; }
.cfg-skel .body { gap: 0; }

.cfg-skel .sk {
	display: block;
	position: relative;
	overflow: hidden;
	border-radius: 4px;
	background: var(--hairline, rgba(0, 0, 0, 0.09));
}
.cfg-skel .sk::after {
	content: "";
	position: absolute;
	inset: 0;
	transform: translateX(-100%);
	background: linear-gradient(
		90deg,
		transparent 0%,
		rgba(255, 255, 255, 0.75) 50%,
		transparent 100%
	);
	animation: nfsShimmer 1.35s ease-in-out infinite;
	animation-delay: var(--skel-delay, 0s);
}

.cfg-skel .sk-media { position: absolute; inset: 0; border-radius: 0; }
.cfg-skel .sk-line { height: 11px; margin-bottom: 10px; }
.cfg-skel .sk-cat { width: 38%; height: 9px; margin-bottom: 14px; }
.cfg-skel .sk-title { width: 72%; height: 22px; margin: 0 0 16px; border-radius: 3px; }
.cfg-skel .sk-short { width: 55%; margin-bottom: 20px; }
.cfg-skel .sk-chip { height: 22px; width: 74px; border-radius: 999px; }
.cfg-skel .sk-chip.w3 { width: 52px; }
.cfg-skel .sk-btn { height: 40px; flex: 1; border-radius: 4px; }
.cfg-skel .product-ctas { margin-top: auto; }

@keyframes nfsShimmer {
	0%   { transform: translateX(-100%); }
	60%  { transform: translateX(100%); }
	100% { transform: translateX(100%); }
}

/* Reduced motion: keep the placeholder, drop the travelling highlight. */
@media (prefers-reduced-motion: reduce) {
	.cfg-skel .sk::after {
		animation: none;
		transform: none;
		background: rgba(255, 255, 255, 0.28);
	}
}

/* ── Landing pages (Services & Inspiration — template-landing.php) ───────── */
.nfs-landing .lp-hero-grid {
	display: grid;
	grid-template-columns: 1.05fr 0.95fr;
	gap: 64px;
	align-items: center;
}
.nfs-landing .lp-headline {
	font-size: clamp(2rem, 4.4vw, 3.4rem);
	line-height: 1.05;
	letter-spacing: -0.02em;
	margin: 18px 0 20px;
}
.nfs-landing .lp-headline em { font-style: italic; }
.nfs-landing .lp-intro { max-width: 46ch; color: var(--ink-soft); }
.nfs-landing .lp-badges { display: flex; flex-wrap: wrap; gap: 10px; margin: 24px 0 0; }
.nfs-landing .lp-badge {
	font-size: 0.72rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	padding: 7px 14px;
	border: 1px solid var(--hairline);
	border-radius: 100px;
	color: var(--ink);
}
.nfs-landing .lp-hero-ctas { margin-top: 32px; }
.nfs-landing .lp-hero-visual .img-ph {
	aspect-ratio: 4 / 5;
	border-radius: 6px;
	overflow: hidden;
}
/* Before/after slider standing in for the hero still: match the slot it replaces.
   The .ba-img layers are absolutely positioned, so reset the ratio they inherit
   from the rule above or they fight the wrapper. */
.nfs-landing .lp-hero-visual .ba-wrap {
	aspect-ratio: 4 / 5;
	border-radius: 6px;
}
.nfs-landing .lp-hero-visual .ba-wrap .img-ph {
	aspect-ratio: auto;
	border-radius: 0;
}

.nfs-landing .lp-feature-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 40px;
	border-top: 1px solid var(--hairline);
	padding-top: 56px;
}
.nfs-landing .lp-feature-num {
	display: block;
	font-size: 0.82rem;
	letter-spacing: 0.14em;
	color: var(--accent);
	margin-bottom: 14px;
}
.nfs-landing .lp-feature h3 { font-size: 1.16rem; margin: 0 0 10px; letter-spacing: -0.01em; }
.nfs-landing .lp-feature p { color: var(--ink-soft); margin: 0; }

.nfs-landing .lp-body { background: var(--paper); }
.nfs-landing .lp-body-wrap { max-width: 760px; }
.nfs-landing .lp-body-wrap p { font-size: 1.12rem; line-height: 1.7; color: var(--ink-soft); }

@media (max-width: 900px) {
	.nfs-landing .lp-hero-grid { grid-template-columns: 1fr; gap: 40px; }
	.nfs-landing .lp-feature-grid { grid-template-columns: 1fr; gap: 32px; }
}

/* Lead-form submit status (book + commercial enquiry) */
.nfs-form-status {
	margin-top: 14px; padding: 10px 14px; border-radius: 8px;
	font-size: 13px; line-height: 1.5;
}
.nfs-form-status[data-state="ok"] { background: var(--accent-soft); color: var(--accent-deep); }
.nfs-form-status[data-state="error"] { background: #fbeae5; color: #9b3412; }

/* Mandatory fields: asterisk on the label, red rule on a field that failed validation.
   The lead forms are `novalidate` and validated in JS, so these carry the whole signal. */
.field-req { color: #c2410c; font-weight: 600; }
.field.is-invalid,
.cfg-cta-card .field.is-invalid {
	border-color: #c2410c;
	background: #fdf3f0;
}
.field.is-invalid:focus { border-color: #c2410c; }
.cfg-q-error {
	margin-top: 8px; padding: 8px 12px; border-radius: 8px;
	background: #fbeae5; color: #9b3412; font-size: 12px; line-height: 1.5;
}

/* Homepage Lookbook "view more" + Work Gallery page grid */
.lookbook-more { margin-top: 40px; text-align: center; }
.nfs-work-gallery .work-gallery-grid {
	display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
}
@media (max-width: 900px) { .nfs-work-gallery .work-gallery-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .nfs-work-gallery .work-gallery-grid { grid-template-columns: 1fr; } }
.nfs-work-gallery .work-card {
	position: relative; margin: 0; border-radius: 8px; overflow: hidden;
	background: var(--bone); aspect-ratio: 4 / 3;
}
.nfs-work-gallery .work-img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s ease; }
.nfs-work-gallery .work-card:hover .work-img { transform: scale(1.04); }
.nfs-work-gallery .work-tag {
	position: absolute; top: 12px; left: 12px;
	background: rgba(251,248,242,0.92); color: var(--accent);
	font-family: "JetBrains Mono", monospace; font-size: 10px;
	letter-spacing: 0.06em; text-transform: uppercase;
	padding: 4px 10px; border-radius: 999px;
}
.nfs-work-gallery .work-cap {
	position: absolute; left: 0; right: 0; bottom: 0;
	padding: 24px 14px 12px; color: #fff; font-size: 13px;
	background: linear-gradient(to top, rgba(0,0,0,0.55), transparent);
}

/* ─── Migrated Flatsome/UX Builder content (see inc/legacy-shortcodes.php) ───
   Blog posts carried over [ux_image], [button], [ux_text], [title], [row]/[col]/[section]
   and [gap] from the old site. The shortcodes now render into these classes so migrated
   articles read in the current design instead of importing the old builder's layout. */
.nfs-legacy-figure { margin: 32px 0; }
.nfs-legacy-figure img,
.nfs-legacy-image { width: 100%; height: auto; border-radius: 4px; display: block; }

.nfs-legacy-title {
  font-family: "Fraunces", Georgia, serif; font-weight: 350;
  font-size: clamp(26px, 3vw, 34px); line-height: 1.12; letter-spacing: -0.015em;
  color: var(--ink); margin-top: 1.8em;
}

.nfs-legacy-text.is-lead { font-size: 18px; line-height: 1.6; color: var(--ink); }

.nfs-legacy-cta { margin: 28px 0; }

.nfs-legacy-gap { height: 20px; }
.nfs-legacy-divider { border: 0; border-top: 1px solid var(--hairline); margin: 40px 0; }

/* The old grid collapses to a single prose column, except where a row genuinely split in two. */
.nfs-legacy-section > * + * { margin-top: 1.2em; }
.nfs-legacy-row { display: grid; gap: 24px; }
.nfs-legacy-row:has(> .is-split + .is-split) { grid-template-columns: 1fr 1fr; }
@media (max-width: 720px) {
  .nfs-legacy-row:has(> .is-split + .is-split) { grid-template-columns: 1fr; }
}
.nfs-legacy-col > * + * { margin-top: 1.2em; }
.nfs-legacy-col > :first-child { margin-top: 0; }
