/* =========================================================
   PP framework — sitewide non-block rules.

   THIS FILE CARRIES NO DESIGN. The starter is deliberately
   unstyled: layout, typography and colour come from
   theme.json, and the visual design comes from the build's
   own Figma / Claude Design work.

   Only two things belong here:

     1. The brand variable surface, so per-block CSS has one
        place to read from. Values mirror theme.json.
     2. The handful of core block-library defaults we have to
        restore, because inc/setup.php dequeues
        `wp-block-library` and those defaults then vanish.

   What must NOT go here: per-page styling, section rhythm,
   decorative treatments, bullet styles. The LCT original
   reached 922 lines because Contact, Clients, Accommodation
   and Airport page rules were added to it, along with a
   client-specific readable-measure cap. Page furniture
   belongs in the block that renders it; brand design belongs
   in the build's own stylesheet.
   ========================================================= */

/* ---------------------------------------------------------
   Brand variables.

   Mirrors theme.json's palette. Editors pick by preset name
   in the sidebar; block CSS reads these. Rebranding a site
   means changing these nine values and the matching palette
   in theme.json, and nothing else.

   The starter's values are neutral greyscale on purpose, so
   nobody mistakes the starter for a finished design.

   The -rgb triples exist so a colour can be used at partial
   alpha — rgb(var(--fw-primary-rgb) / 0.85) — and stay
   swappable.
   --------------------------------------------------------- */
:root {
	--fw-primary:     #2A2C37;
	--fw-secondary:   #2A3B5A;
	--fw-accent:      #4D5C75;
	--fw-link:        #2A2C37;
	--fw-highlight:   #B0C4DB;
	--fw-grey:        #999999;
	--fw-light-grey:  #D9D9D9;
	--fw-bg-grey:     #F2F2F2;
	--fw-white:       #FFFFFF;

	--fw-primary-rgb:    42 44 55;
	--fw-secondary-rgb:  42 59 90;
	--fw-accent-rgb:     77 92 117;
	--fw-link-rgb:       42 44 55;
	--fw-light-grey-rgb: 217 217 217;
}

/* ---------------------------------------------------------
   Restored core defaults.

   `wp-block-library` is dequeued, so these stop existing.
   Each one is here because something breaks without it, not
   because it looks better.
   --------------------------------------------------------- */

/* Alignment classes core would otherwise provide. */
.has-text-align-left   { text-align: left; }
.has-text-align-center { text-align: center; }
.has-text-align-right  { text-align: right; }
/* Live justifies most of its body copy, so the builder now carries it through
   and the class has to exist: core's stylesheet is dequeued. */
.has-text-align-justify { text-align: justify; }

/* Core resets these on the block-library stylesheet; without it the browser
   default indent applies and list markers sit outside the content column. */
.entry-content ul,
.entry-content ol {
	padding-left: 1.25em;
}

.entry-content ul { list-style: disc; }
.entry-content ol { list-style: decimal; }

/* Core's `* { font: inherit }` reset removes these; put them back so bold and
   italic in editor content still render as bold and italic. */
/* `bolder` is relative: inside a heading or a paragraph already set to 700 it
   computes to 900, which is a different weight from the one the design
   asks for and a visibly heavier one where the family has a 900 cut. */
strong, b { font-weight: bold; }
em, i     { font-style: italic; }

/* Images should never overflow their container. */
img, svg, video { max-width: 100%; height: auto; }

/* Horizontal-overflow safety net. Stops one wide element forcing the whole
   page to scroll sideways on mobile. */
html, body { overflow-x: clip; }

/* Figures carry a browser default margin that fights block spacing. */
figure { margin: 0; }

/* Screen-reader-only text. Core ships this in wp-block-library, which
   inc/setup.php dequeues, so without it every visually-hidden label — the
   search block's, for one — renders as a full-width absolutely positioned
   element and drags the document 900px wider than the viewport. */
.screen-reader-text {
	border: 0;
	clip-path: inset(50%);
	/* !important because the legacy plugin stylesheets (ivory-search,
	   ubermenu, cornerstone) load after the theme and set label widths. */
	height: 1px !important;
	width: 1px !important;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	position: absolute;
	white-space: nowrap;
	word-wrap: normal !important;
}
.screen-reader-text:focus {
	clip-path: none;
	height: auto;
	width: auto;
	margin: 0;
	padding: 15px 23px 14px;
	background: #fff;
	color: #2a2c37;
	display: block;
	font-size: 14px;
	line-height: normal;
	text-decoration: none;
	top: 5px;
	left: 5px;
	z-index: 100000;
}

/* Core image alignment. wp-block-library is dequeued, so the classes core
   writes into image blocks have no styling of their own: an `aligncenter`
   screenshot sat hard left instead of centred. */
figure.wp-block-image { margin: 0 0 1em; }
figure.wp-block-image.aligncenter { display: table; margin-left: auto; margin-right: auto; }
figure.wp-block-image.alignleft { float: left; margin: 0.5em 1em 1em 0; }
figure.wp-block-image.alignright { float: right; margin: 0.5em 0 1em 1em; }
figure.wp-block-image img { display: block; height: auto; }
figure.wp-block-image figcaption { margin: 8px 0 0; font-size: 13px; }

/* Live's content column is 1200 wide with no gutter at 1440: its paragraphs
   measure 1200 at x120, ours measured 1240 at x100 because the root padding
   sat outside the content size. The text landed in the same place either way,
   but the difference masked real ones on every page. Root padding is 0, and the
   gutter comes back only when the viewport is narrow enough to need it. */
@media (max-width: 1239px) {
	body {
		--wp--style--root-padding-left: 20px;
		--wp--style--root-padding-right: 20px;
	}
	.has-global-padding { padding-left: 20px; padding-right: 20px; }

	/* …but a full-width block still runs to the edge. That gutter inset every
	   band by 20px on a narrow viewport, where the design paints them edge to
	   edge; it showed up as a 40px-narrow column on every page the first time
	   this was compared at 390px. Blocks hold their own content in. */
	.has-global-padding > .alignfull {
		margin-left: -20px;
		margin-right: -20px;
		width: calc(100% + 40px);
		max-width: calc(100% + 40px);
	}
}
