/*
Theme Name: Securitise
Theme URI: https://www.securitise.uk/
Author: Securitise Limited
Description: Lightweight block theme for Securitise. British racing green and gold, no page builder.
Version: 1.0.0
Requires at least: 6.5
Tested up to: 6.8
Requires PHP: 8.0
License: Proprietary
Text Domain: securitise
*/

/* ---------- Base ---------- */
:root {
	--sx-line: rgba(9, 22, 14, 0.12);
	--sx-line-dark: rgba(255, 255, 255, 0.14);
	--sx-radius: var(--wp--custom--radius, 6px);
}
html { scroll-behavior: smooth; scroll-padding-top: 96px; }
body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
:where(.wp-site-blocks) > main { margin-block-start: 0; }
:focus-visible { outline: 2px solid var(--wp--preset--color--gold); outline-offset: 3px; }
.screen-reader-text:focus { background: #fff; color: var(--wp--preset--color--ink); padding: .5rem 1rem; z-index: 1000; }
img { height: auto; }

/* ---------- Type helpers ---------- */
.sx-eyebrow {
	font-family: var(--wp--preset--font-family--mono);
	font-size: var(--wp--preset--font-size--xs);
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--wp--preset--color--gold-deep);
	margin-block-end: 0.75rem !important;
}
.sx-lede {
	font-size: var(--wp--preset--font-size--lg);
	line-height: 1.5;
	color: var(--wp--preset--color--slate);
}
.sx-strap {
	font-family: var(--wp--preset--font-family--mono);
	font-size: var(--wp--preset--font-size--xs);
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--wp--preset--color--sage);
}
.sx-small { font-size: var(--wp--preset--font-size--sm); color: var(--wp--preset--color--slate); }
.sx-tbc {
	background: #FFF1C2;
	color: #5B4300;
	padding: 0 .3em;
	border-radius: 3px;
	font-size: .92em;
}

/* ---------- Sections ---------- */
.sx-section { padding-block: var(--wp--preset--spacing--60); margin-block: 0 !important; }
.sx-section--tight { padding-block: var(--wp--preset--spacing--50); }
.sx-tint { background: var(--wp--preset--color--tint); }
.sx-dark, .sx-ink {
	color: rgba(255, 255, 255, 0.86);
	background: var(--wp--preset--color--racing);
}
.sx-ink { background: var(--wp--preset--color--ink); }
.sx-dark :where(h1, h2, h3, h4), .sx-ink :where(h1, h2, h3, h4) { color: #fff; }
.sx-dark .sx-eyebrow, .sx-ink .sx-eyebrow { color: var(--wp--preset--color--gold-light); }
.sx-dark .sx-lede, .sx-ink .sx-lede { color: rgba(255, 255, 255, 0.82); }
.sx-dark .sx-strap, .sx-ink .sx-strap { color: rgba(255, 255, 255, 0.55); }
.sx-dark a:not(.wp-element-button), .sx-ink a:not(.wp-element-button) { color: var(--wp--preset--color--gold-light); }
.sx-dark .sx-small, .sx-ink .sx-small { color: rgba(255, 255, 255, 0.7); }
.sx-section > * + * { margin-block-start: 1.25rem; }
.sx-head { margin-block-end: var(--wp--preset--spacing--40) !important; }
.sx-head > *, .sx-hero__inner > * { max-width: var(--wp--custom--max-text, 68ch); }
.sx-head h2 { max-width: 20ch; }
.wp-block-column p, .wp-block-column li { max-width: var(--wp--custom--max-text, 68ch); }

/* ---------- Hero ---------- */
.sx-hero {
	position: relative;
	overflow: hidden;
	background:
		radial-gradient(1100px 520px at 88% -10%, rgba(201, 160, 64, 0.16), transparent 60%),
		radial-gradient(900px 600px at -10% 110%, rgba(47, 107, 69, 0.22), transparent 60%),
		linear-gradient(160deg, var(--wp--preset--color--racing) 0%, var(--wp--preset--color--ink) 78%);
	padding-block: clamp(4.5rem, 11vw, 9rem) clamp(4rem, 9vw, 7rem);
}
.sx-hero::after {
	/* faint circuit-grid texture */
	content: "";
	position: absolute; inset: 0;
	background-image:
		linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
		linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
	background-size: 56px 56px;
	mask-image: linear-gradient(180deg, #000 0%, transparent 85%);
	pointer-events: none;
}
.sx-hero > * { position: relative; z-index: 1; }
.sx-hero__inner > h1 { max-width: 16ch; }
.sx-hero h1 em { font-style: normal; color: var(--wp--preset--color--gold-light); }
.sx-hero__inner > .sx-lede { max-width: 58ch; }
.sx-hero--page { padding-block: clamp(3.5rem, 8vw, 6rem) clamp(3rem, 6vw, 4.5rem); }
.sx-hero--page h1 { font-size: var(--wp--preset--font-size--xxl); }
.sx-hero--page .sx-hero__inner > h1 { max-width: 22ch; }
.sx-hero__inner > .sx-stats { max-width: none; margin-top: var(--wp--preset--spacing--50); }

.sx-hero__cols { gap: clamp(2rem, 5vw, 4rem) !important; }
.sx-hero > .sx-stats { margin-top: var(--wp--preset--spacing--50); }

/* ---------- Photography ----------
   Stock photos get one consistent brand treatment: slightly desaturated,
   with a green-to-ink tint and a thin gold keyline, so mixed sources match. */
.wp-block-image.sx-photo { position: relative; margin: 0; border-radius: var(--sx-radius); overflow: hidden; isolation: isolate; }
.wp-block-image.sx-photo img { display: block; width: 100%; height: 100%; aspect-ratio: 4 / 3; object-fit: cover; filter: saturate(.8) contrast(1.03); }
.wp-block-image.sx-photo::after {
	content: ""; position: absolute; inset: 0; pointer-events: none;
	background: linear-gradient(160deg, rgba(14, 53, 32, .28) 0%, rgba(9, 22, 14, .12) 55%, rgba(201, 160, 64, .10) 100%);
	mix-blend-mode: multiply;
	box-shadow: inset 0 0 0 1px rgba(217, 182, 92, .28);
	border-radius: inherit;
}
.wp-block-image.sx-photo--hero img { aspect-ratio: 4 / 5; }
.sx-dark .wp-block-image.sx-photo, .sx-ink .wp-block-image.sx-photo { box-shadow: 0 24px 48px -24px rgba(0, 0, 0, .6); }
.wp-block-column > .wp-block-image.sx-photo + * { margin-top: 1.5rem; }
@media (max-width: 781px) {
	.wp-block-image.sx-photo--hero img { aspect-ratio: 4 / 3; }
}

/* ---------- Buttons ---------- */
.wp-block-button.is-style-outline > .wp-block-button__link,
.wp-block-button .wp-block-button__link.is-style-outline {
	background: transparent;
	color: var(--wp--preset--color--ink);
	border: 1.5px solid currentColor;
	padding-block: calc(0.85rem - 1.5px);
}
.sx-dark .wp-block-button.is-style-outline > .wp-block-button__link,
.sx-ink .wp-block-button.is-style-outline > .wp-block-button__link { color: #fff; }
.wp-block-button.is-style-outline > .wp-block-button__link:hover { background: rgba(201, 160, 64, 0.14); color: inherit; }
.wp-block-buttons { gap: .75rem; }

/* ---------- Cards ---------- */
.sx-cards { gap: 1.25rem !important; }
.sx-cards > .wp-block-column {
	background: #fff;
	border: 1px solid var(--sx-line);
	border-radius: var(--sx-radius);
	padding: clamp(1.25rem, 3vw, 2rem);
}
.sx-tint .sx-cards > .wp-block-column { border-color: transparent; box-shadow: 0 1px 2px rgba(9,22,14,.06); }
.sx-dark .sx-cards > .wp-block-column,
.sx-ink .sx-cards > .wp-block-column {
	background: rgba(255, 255, 255, 0.04);
	border-color: var(--sx-line-dark);
}
.sx-cards > .wp-block-column > * + * { margin-block-start: .75rem; }
.sx-cards h3 { margin-block-start: .25rem; }
.sx-cards .sx-eyebrow { margin-block-end: 0 !important; }
.sx-cards--link > .wp-block-column { transition: border-color .15s ease, transform .15s ease; }
.sx-cards--link > .wp-block-column:hover { border-color: var(--wp--preset--color--gold); transform: translateY(-2px); }
.sx-cards--link h3 a { color: inherit; text-decoration: none; }
.sx-cards--link h3 a::after { content: " \2192"; color: var(--wp--preset--color--gold-deep); }
.sx-dark .sx-cards--link h3 a, .sx-ink .sx-cards--link h3 a { color: #fff; }

/* ---------- Lists ---------- */
.sx-ticks { list-style: none; padding-left: 0; }
.sx-ticks li { position: relative; padding-left: 1.75rem; margin-block: .5rem; }
.sx-ticks li::before {
	content: "";
	position: absolute; left: 0; top: .45em;
	width: 1rem; height: .55rem;
	border-left: 2.5px solid var(--wp--preset--color--gold);
	border-bottom: 2.5px solid var(--wp--preset--color--gold);
	transform: rotate(-45deg) translateY(-2px);
}

/* The ladder: "Support is the floor, not the service" */
.sx-ladder { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; counter-reset: rung; }
.sx-ladder li {
	max-width: none;
	display: flex; align-items: baseline; gap: 1rem;
	padding: .9rem 1.25rem;
	border-radius: var(--sx-radius);
	background: rgba(255, 255, 255, 0.05);
	border: 1px solid var(--sx-line-dark);
	color: #fff;
}
.sx-ladder li strong { color: var(--wp--preset--color--gold-light); min-width: 13ch; font-family: var(--wp--preset--font-family--mono); font-size: var(--wp--preset--font-size--xs); letter-spacing: .12em; text-transform: uppercase; }
.sx-ladder li:last-child { background: transparent; border-style: dashed; color: rgba(255,255,255,.7); }
.sx-ladder li:last-child strong { color: rgba(255,255,255,.55); }

/* ---------- Stages / timeline ---------- */
.sx-stages { gap: 1.25rem !important; counter-reset: stage; }
.sx-stages > .wp-block-column {
	border-top: 2px solid var(--wp--preset--color--gold);
	padding-top: 1.25rem;
}
.sx-stages .sx-eyebrow { margin-block-end: .25rem !important; }

/* ---------- Stats strip ---------- */
.sx-stats { gap: 0 !important; border-top: 1px solid var(--sx-line-dark); border-bottom: 1px solid var(--sx-line-dark); }
.sx-stats > .wp-block-column { padding: 1.5rem 1rem; }
.sx-stats > .wp-block-column + .wp-block-column { border-left: 1px solid var(--sx-line-dark); }
.sx-stats p:first-child { font-size: var(--wp--preset--font-size--xl); font-weight: 700; color: #fff; line-height: 1.1; margin: 0; }
.sx-stats p:last-child { font-family: var(--wp--preset--font-family--mono); font-size: var(--wp--preset--font-size--xs); text-transform: uppercase; letter-spacing: .12em; color: rgba(255,255,255,.6); margin-top: .4rem; }
@media (max-width: 781px) {
	.wp-block-columns.sx-stats { flex-wrap: wrap !important; }
	.wp-block-columns.sx-stats > .wp-block-column { flex-basis: 50% !important; flex-grow: 0; padding: 1.1rem .75rem 1.1rem 0; }
	.sx-stats > .wp-block-column + .wp-block-column { border-left: 0; }
	.sx-stats p:first-child { font-size: var(--wp--preset--font-size--lg); }
}

/* ---------- Comparison table ---------- */
.sx-compare { overflow-x: auto; }
.sx-compare table { border-collapse: collapse; width: 100%; min-width: 560px; font-size: var(--wp--preset--font-size--sm); }
.sx-compare th, .sx-compare td { border: 0; border-bottom: 1px solid var(--sx-line); padding: .8rem 1rem; text-align: left; vertical-align: top; }
.sx-compare thead th { font-family: var(--wp--preset--font-family--mono); font-size: var(--wp--preset--font-size--xs); letter-spacing: .12em; text-transform: uppercase; color: var(--wp--preset--color--slate); border-bottom: 2px solid var(--wp--preset--color--ink); }
.sx-compare td:nth-child(2) { background: rgba(201, 160, 64, 0.08); font-weight: 600; }
.sx-compare thead th:nth-child(2) { background: var(--wp--preset--color--racing); color: var(--wp--preset--color--gold-light); border-bottom-color: var(--wp--preset--color--racing); }

/* ---------- FAQ (details) ---------- */
.wp-block-details {
	border-bottom: 1px solid var(--sx-line);
	padding-block: 1.1rem;
	margin-block: 0 !important;
}
.wp-block-details summary {
	cursor: pointer;
	font-weight: 700;
	font-size: var(--wp--preset--font-size--lg);
	line-height: 1.3;
	list-style: none;
	position: relative;
	padding-right: 2.5rem;
}
.wp-block-details summary::-webkit-details-marker { display: none; }
.wp-block-details summary::after {
	content: "+";
	position: absolute; right: .25rem; top: -.1rem;
	font-size: 1.6rem; font-weight: 400;
	color: var(--wp--preset--color--gold-deep);
	transition: transform .15s ease;
}
.wp-block-details[open] summary::after { transform: rotate(45deg); }
.wp-block-details > :not(summary) { margin-block-start: .75rem; color: var(--wp--preset--color--slate); }

/* ---------- CTA band ---------- */
.sx-cta h2 { max-width: 22ch; }

/* ---------- Home intro ---------- */
.sx-intro {
	position: fixed; inset: 0; z-index: 10000;
	display: grid; place-items: center;
	background: radial-gradient(1200px 800px at 50% 42%, #0E3520 0%, #09160E 72%);
	cursor: pointer;
	animation: sx-intro-out .9s cubic-bezier(.7, 0, .3, 1) 2.2s forwards;
}
.sx-intro.is-done { animation: sx-intro-out .45s ease forwards; }
.sx-intro-seen .sx-intro { display: none; }
.sx-intro__logo {
	position: relative; z-index: 1;
	width: min(72vw, 460px);
	animation: sx-intro-in 1.1s cubic-bezier(.2, .8, .2, 1) .1s both, sx-intro-lift .9s cubic-bezier(.7, 0, .3, 1) 2.2s forwards;
}
.sx-intro__logo svg { display: block; width: 100%; height: auto; overflow: visible; }
.sx-intro__glow {
	position: absolute; left: 50%; top: 42%;
	width: min(90vw, 720px); aspect-ratio: 1; translate: -50% -50%;
	background: radial-gradient(circle, rgba(217, 182, 92, .22) 0%, rgba(217, 182, 92, 0) 62%);
	animation: sx-intro-glow 2.2s ease-out .2s both;
}
@keyframes sx-intro-in { from { opacity: 0; transform: scale(.88); filter: blur(8px); } to { opacity: 1; transform: none; filter: none; } }
@keyframes sx-intro-glow { 0% { opacity: 0; scale: .6; } 55% { opacity: 1; scale: 1; } 100% { opacity: .6; scale: 1.08; } }
@keyframes sx-intro-lift { to { opacity: 0; transform: scale(1.06) translateY(-12px); } }
@keyframes sx-intro-out { to { opacity: 0; visibility: hidden; pointer-events: none; } }
@media (prefers-reduced-motion: reduce) { .sx-intro { display: none; } }

/* ---------- Header ---------- */
.wp-site-blocks > * { margin-block-start: 0 !important; }
.sx-header-wrap { position: sticky; top: 0; z-index: 50; }
.admin-bar .sx-header-wrap { top: 32px; }
@media (max-width: 782px) { .admin-bar .sx-header-wrap { top: 0; } }
.sx-header {
	color: #fff;
	background: rgba(9, 22, 14, 0.94);
	backdrop-filter: saturate(140%) blur(8px);
	-webkit-backdrop-filter: saturate(140%) blur(8px);
	border-bottom: 1px solid rgba(255, 255, 255, 0.08);
	padding-block: .85rem;
}
.sx-brand { display: inline-flex; align-items: center; gap: .65rem; text-decoration: none; color: #fff; }
.sx-brand svg { display: block; height: 38px; width: auto; flex: none; }
.sx-brand--footer svg { height: 120px; }
@media (max-width: 600px) { .sx-brand svg { height: 30px; } }
.sx-brand__word { font-weight: 800; letter-spacing: .08em; font-size: 1.2rem; color: #fff; line-height: 1; }
.sx-brand__word b { color: var(--wp--preset--color--gold-light); font-weight: 800; }
.sx-header .wp-block-navigation { color: rgba(255, 255, 255, 0.86); }
.sx-header .wp-block-navigation a { text-decoration: none; }
.sx-header .wp-block-navigation a:hover { color: var(--wp--preset--color--gold-light); }
.sx-header .wp-block-navigation .wp-block-navigation__submenu-container {
	background: var(--wp--preset--color--ink) !important;
	color: #fff !important;
	border: 1px solid rgba(255,255,255,.1) !important;
	border-radius: var(--sx-radius);
	padding: .4rem 0;
	min-width: 250px;
}
.sx-header .wp-block-navigation .wp-block-navigation__submenu-container a { padding: .55rem 1.1rem; }
.sx-header .wp-block-navigation__responsive-container.is-menu-open {
	background: var(--wp--preset--color--ink) !important;
	color: #fff !important;
	padding: 1.5rem;
}
.sx-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container { border: 0 !important; background: transparent !important; }
.sx-header .wp-block-navigation-item.sx-nav-cta > a {
	background: var(--wp--preset--color--gold);
	color: var(--wp--preset--color--ink) !important;
	padding: .55rem 1rem;
	border-radius: var(--sx-radius);
	font-weight: 700;
}
.sx-header .wp-block-navigation-item.sx-nav-cta > a:hover { background: var(--wp--preset--color--gold-light); }

/* ---------- Footer ---------- */
.sx-footer { background: var(--wp--preset--color--ink); color: rgba(255,255,255,.72); padding-block: var(--wp--preset--spacing--50) var(--wp--preset--spacing--40); font-size: var(--wp--preset--font-size--sm); margin-block-start: 0 !important; }
.sx-footer h2 { font-family: var(--wp--preset--font-family--mono); font-size: var(--wp--preset--font-size--xs); letter-spacing: .14em; text-transform: uppercase; color: var(--wp--preset--color--gold-light); margin-bottom: .9rem; }
.sx-footer ul { list-style: none; padding: 0; margin: 0; }
.sx-footer li { margin-block: .4rem; }
.sx-footer a { color: rgba(255,255,255,.86); text-decoration: none; }
.sx-footer a:hover { color: var(--wp--preset--color--gold-light); text-decoration: underline; }
.sx-footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 2rem; }
@media (max-width: 900px) { .sx-footer__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .sx-footer__grid { grid-template-columns: 1fr; } }
.sx-footer__legal { border-top: 1px solid rgba(255,255,255,.1); margin-top: 2.5rem; padding-top: 1.5rem; font-size: var(--wp--preset--font-size--xs); color: rgba(255,255,255,.55); }
.sx-footer__legal p { max-width: none; margin: .3rem 0; }

/* ---------- Contact form ---------- */
.sx-form { display: grid; gap: 1rem; max-width: 640px; }
.sx-form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 600px) { .sx-form__row { grid-template-columns: 1fr; } }
.sx-form label { display: block; font-weight: 600; font-size: var(--wp--preset--font-size--sm); margin-bottom: .35rem; }
.sx-form input[type=text], .sx-form input[type=email], .sx-form input[type=tel], .sx-form textarea {
	width: 100%; box-sizing: border-box;
	font: inherit; font-size: 1rem;
	padding: .75rem .9rem;
	border: 1px solid rgba(9,22,14,.25);
	border-radius: var(--sx-radius);
	background: #fff; color: var(--wp--preset--color--ink);
}
.sx-form input:focus, .sx-form textarea:focus { outline: 2px solid var(--wp--preset--color--gold); outline-offset: 1px; border-color: var(--wp--preset--color--green); }
.sx-form textarea { min-height: 150px; resize: vertical; }
.sx-form__check { display: flex; gap: .6rem; align-items: flex-start; font-size: var(--wp--preset--font-size--sm); color: var(--wp--preset--color--slate); }
.sx-form__check input { margin-top: .3rem; }
.sx-form__hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.sx-form button {
	justify-self: start;
	font: inherit; font-weight: 700; font-size: var(--wp--preset--font-size--sm); letter-spacing: .02em;
	background: var(--wp--preset--color--gold); color: var(--wp--preset--color--ink);
	border: 0; border-radius: var(--sx-radius);
	padding: .9rem 1.6rem; cursor: pointer;
}
.sx-form button:hover { background: var(--wp--preset--color--gold-light); }
.sx-notice { padding: 1rem 1.25rem; border-radius: var(--sx-radius); background: var(--wp--preset--color--mist); color: var(--wp--preset--color--ink); max-width: 640px; }
.sx-notice--error { background: #FBE5DD; color: #6B2210; }

/* ---------- Contact page ---------- */
.sx-contact .wp-block-columns { align-items: flex-start; }
.sx-steps-list { list-style: none; padding: 0; margin: 0 0 2rem; counter-reset: sxs; display: grid; gap: 1rem; }
.sx-steps-list li { counter-increment: sxs; position: relative; padding-left: 2.6rem; }
.sx-steps-list li::before {
	content: counter(sxs);
	position: absolute; left: 0; top: -.05rem;
	width: 1.8rem; height: 1.8rem; border-radius: 50%;
	display: grid; place-items: center;
	background: var(--wp--preset--color--racing); color: var(--wp--preset--color--gold-light);
	font-weight: 700; font-size: .9rem;
}
.sx-contact h3 { font-size: var(--wp--preset--font-size--md); margin-top: 1.75rem; }

/* ---------- Legal pages ---------- */
.sx-summary { background: var(--wp--preset--color--tint); border-radius: var(--sx-radius); padding: clamp(1.25rem, 3vw, 1.75rem); margin-block: 1.5rem 2.5rem !important; }
.sx-summary > * + * { margin-block-start: .75rem; }
.sx-summary .wp-block-buttons { margin-block-start: 1rem; }
.sx-toc { columns: 2; column-gap: 2.5rem; padding-left: 1.25rem; font-size: var(--wp--preset--font-size--sm); }
.sx-toc li { break-inside: avoid; margin-block: .25rem; }
@media (max-width: 600px) { .sx-toc { columns: 1; } }
.sx-prose h2[id] { scroll-margin-top: 96px; }
.sx-cookie-table table { min-width: 620px; }
.sx-cookie-table td:nth-child(2) { background: none; font-weight: 400; }
.sx-cookie-table thead th:nth-child(2) { background: none; color: var(--wp--preset--color--slate); border-bottom-color: var(--wp--preset--color--ink); }
.sx-cookie-table td:first-child { font-family: var(--wp--preset--font-family--mono); font-size: .85em; word-break: break-word; }

/* ---------- Simple / legal pages ---------- */
.sx-prose { padding-block: var(--wp--preset--spacing--50); }
.sx-prose h2 { font-size: var(--wp--preset--font-size--xl); margin-top: 2.5rem; }
.sx-prose h3 { margin-top: 1.75rem; }

/* ---------- Posts ---------- */
.sx-post-list .wp-block-post { border-bottom: 1px solid var(--sx-line); padding-block: 1.5rem; }
.sx-post-list .wp-block-post-title a { text-decoration: none; color: var(--wp--preset--color--ink); }

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	* { transition: none !important; }
}

/* Sector examples */
.sx-example { margin-top: 1.5rem !important; padding: 1rem 1.25rem; }
.sx-example p:last-child { margin: 0; font-style: italic; color: var(--wp--preset--color--slate); }
.sx-tint .sx-example { background: #fff; }

