/* i-hate-spreadsheets.co.uk — site styles
   Rage red, aubergine ink, chunky pill buttons and a spellcheck squiggle.
   A cousin of outgrownspreadsheets.co.uk, deliberately not a twin. */

:root {
	--paper: #ffffff;
	--panel: #f5f3f8; /* lilac grey */
	--line: #e2dee8;
	--line-strong: #c7c0d1;
	--ink: #1c1626; /* aubergine */
	--ink-2: #463f52;
	--muted: #645c70;
	--accent: #ff5440; /* rage red */
	--accent-soft: #ffe5e1;
	--accent-deep: #d7301c; /* red text on white */
	--on-ink: #e4dfea;
	--sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--max: 1120px;
	--col: 44rem;
	--radius: 10px;
}

*,
*::before,
*::after {
	box-sizing: border-box;
}
html {
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
	scroll-padding-top: 84px;
}
body {
	margin: 0;
	background: var(--paper);
	color: var(--ink);
	font: 400 1.0625rem/1.65 var(--sans);
	-webkit-font-smoothing: antialiased;
}
a {
	color: inherit;
	text-decoration-color: var(--accent);
	text-decoration-thickness: 2px;
	text-underline-offset: 4px;
}
a:hover {
	color: var(--accent-deep);
}

/* KEEP: visible keyboard focus and a working skip link */
:focus-visible {
	outline: 3px solid var(--ink);
	outline-offset: 3px;
}
.skip {
	position: absolute;
	left: -999px;
	top: 8px;
	z-index: 100;
	background: var(--ink);
	color: #fff;
	padding: 8px 14px;
}
.skip:focus {
	left: 12px;
}

/* KEEP: respect reduced-motion settings */
@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}
	*,
	*::before,
	*::after {
		transition: none !important;
		animation: none !important;
	}
}

.wrap {
	width: 100%;
	max-width: var(--max);
	margin: 0 auto;
	padding: 0 20px;
}
.col {
	max-width: var(--col);
}

h1,
h2,
h3 {
	margin: 0 0 0.5em;
	font-weight: 820;
	letter-spacing: -0.03em;
	line-height: 1.05;
	text-wrap: balance;
}
h1 {
	font-size: clamp(2.4rem, 1.3rem + 3.6vw, 4.15rem);
	letter-spacing: -0.04em;
	line-height: 1.04;
}
h2 {
	font-size: clamp(1.8rem, 1.3rem + 1.8vw, 2.65rem);
}
h3 {
	font-size: 1.12rem;
	letter-spacing: -0.01em;
	line-height: 1.3;
}
p {
	margin: 0 0 1em;
}
.lede {
	font-size: clamp(1.1rem, 1rem + 0.5vw, 1.28rem);
	color: var(--ink-2);
	max-width: 36rem;
}

/* Buttons: chunky pills with a hard shadow */
.btn {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 13px 24px;
	border: 2px solid var(--ink);
	border-radius: 999px;
	background: var(--accent);
	color: var(--ink);
	font: 750 1rem/1.2 var(--sans);
	text-decoration: none;
	white-space: nowrap;
	cursor: pointer;
	box-shadow: 4px 4px 0 var(--ink);
	transition: transform 0.08s, box-shadow 0.08s;
}
.btn:hover {
	color: var(--ink);
	transform: translate(1px, 1px);
	box-shadow: 3px 3px 0 var(--ink);
}
.btn:active {
	transform: translate(4px, 4px);
	box-shadow: 0 0 0 var(--ink);
}
.btn[disabled] {
	opacity: 0.6;
	cursor: wait;
}
.btn-sm {
	padding: 8px 16px;
	font-size: 0.92rem;
	box-shadow: 3px 3px 0 var(--ink);
}
.text-link {
	font-weight: 650;
	text-decoration: underline;
	text-decoration-color: var(--accent);
}
.tel-link {
	display: inline-flex;
	align-items: center;
	gap: 0.45em;
	font-weight: 700;
	font-variant-numeric: tabular-nums;
}
.tel-link i {
	font-size: 0.85em;
}

/* Header */
.site-header {
	position: sticky;
	top: 0;
	z-index: 50;
	background: rgba(255, 255, 255, 0.95);
	backdrop-filter: blur(6px);
	border-bottom: 2px solid var(--ink);
}
.site-header .wrap {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	min-height: 68px;
}
.brand {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	font-weight: 820;
	font-size: 1.05rem;
	letter-spacing: -0.02em;
	text-decoration: none;
	white-space: nowrap;
}
.brand img {
	width: 28px;
	height: 28px;
}
.header-right {
	display: flex;
	align-items: center;
	gap: 20px;
}
.header-phone {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-weight: 650;
	font-variant-numeric: tabular-nums;
	text-decoration: none;
}
@media (max-width: 640px) {
	.header-phone {
		display: none;
	}
}
@media (max-width: 480px) {
	.site-header .wrap {
		gap: 10px;
	}
	.site-header .brand {
		gap: 8px;
		font-size: 0.95rem;
	}
	.site-header .brand img {
		width: 24px;
		height: 24px;
	}
	.site-header .btn-sm {
		padding: 7px 12px;
		font-size: 0.84rem;
		box-shadow: 2px 2px 0 var(--ink);
	}
}
@media (max-width: 359px) {
	.site-header .brand {
		font-size: 0.86rem;
	}
}

/* Sections */
section {
	padding: clamp(56px, 8vw, 104px) 0;
}
section + section {
	border-top: 1px solid var(--line);
}
section.panel {
	background: var(--panel);
}

/* Hero */
.hero {
	padding-top: clamp(40px, 6vw, 84px);
	overflow: hidden;
}
.hero-grid {
	display: grid;
	gap: clamp(40px, 5vw, 64px);
	grid-template-columns: minmax(0, 1fr);
}
@media (min-width: 980px) {
	.hero-grid {
		grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
		align-items: center;
	}
}
.squig {
	position: relative;
	white-space: nowrap;
}
.squig svg {
	position: absolute;
	left: -0.04em;
	bottom: -0.04em;
	width: calc(100% + 0.08em);
	height: 0.2em;
	overflow: visible;
}
.squig path {
	fill: none;
	stroke: var(--accent);
	stroke-width: 2.2;
	stroke-linecap: round;
}
.actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 14px 26px;
	margin-top: 28px;
}
.hero .small {
	margin: 24px 0 0;
	max-width: 30rem;
	color: var(--muted);
	font-size: 0.95rem;
}

/* The illustrative pop-ups */
.hero-visual {
	margin: 0;
}
.popups {
	position: relative;
	height: 585px;
}
.popup {
	--r: 0deg;
	position: absolute;
	width: min(380px, 88%);
	background: #fff;
	border: 2px solid var(--ink);
	border-radius: var(--radius);
	box-shadow: 6px 6px 0 var(--ink);
	font-size: 0.86rem;
	line-height: 1.45;
	transform: rotate(var(--r));
}
.p1 {
	--r: -2.2deg;
	top: 0;
	left: 0;
}
.p2 {
	--r: 1.6deg;
	top: 205px;
	right: 0;
}
.p3 {
	--r: -0.8deg;
	top: 405px;
	left: 24px;
}
.popup-bar {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 8px 12px;
	border-bottom: 1px solid var(--line-strong);
	border-radius: 8px 8px 0 0;
	background: var(--panel);
	color: var(--ink-2);
	font-size: 0.8rem;
	font-weight: 650;
}
.dots {
	display: inline-flex;
	gap: 5px;
}
.dots span {
	width: 9px;
	height: 9px;
	border: 1.5px solid var(--line-strong);
	border-radius: 50%;
	background: #fff;
}
.not-responding {
	color: var(--accent-deep);
}
.popup-body {
	display: flex;
	gap: 12px;
	padding: 14px 16px 6px;
}
.popup-body p {
	margin: 0;
}
.popup-body strong {
	display: block;
}
.popup-icon {
	display: grid;
	place-items: center;
	flex: 0 0 auto;
	width: 30px;
	height: 30px;
	border-radius: 50%;
	background: var(--panel);
	color: var(--ink-2);
	font-size: 0.8rem;
}
.popup-icon.warn {
	background: var(--accent-soft);
	color: var(--accent-deep);
}
.popup-btns {
	display: flex;
	flex-wrap: wrap;
	justify-content: flex-end;
	gap: 8px;
	padding: 10px 14px 14px;
}
.popup-btns span {
	padding: 5px 12px;
	border: 1.5px solid var(--line-strong);
	border-radius: 6px;
	background: #fff;
	font-size: 0.8rem;
	font-weight: 600;
	white-space: nowrap;
}
.popup-btns .def {
	border-color: var(--ink);
	background: var(--ink);
	color: #fff;
}
.popup-btns .save {
	position: relative;
}
.pointer {
	display: none;
	position: absolute;
	left: 55%;
	top: 50%;
	width: 26px;
	height: 26px;
	pointer-events: none;
}
.pointer path {
	fill: #fff;
	stroke: var(--ink);
	stroke-width: 1.6;
	stroke-linejoin: round;
}
.caption {
	margin: 14px 4px 0;
	color: var(--muted);
	font-size: 0.82rem;
}
@media (max-width: 640px) {
	.popups {
		height: auto;
		display: grid;
		gap: 18px;
	}
	.popup {
		position: static;
		width: auto;
	}
	.p3 {
		display: none;
	}
}

/* Hero animation: only for people who haven't asked for less motion */
@media (prefers-reduced-motion: no-preference) {
	.squig path {
		stroke-dasharray: 1;
		stroke-dashoffset: 1;
		animation: draw 0.9s ease-out 0.35s forwards;
	}
	.popup {
		animation: pop 0.7s cubic-bezier(0.2, 0.9, 0.3, 1.25) var(--d, 0s) both;
	}
	.p1 {
		--d: 0.5s;
	}
	.p2 {
		--d: 1.1s;
	}
	.p3 {
		--d: 1.7s;
		animation:
			pop 0.7s cubic-bezier(0.2, 0.9, 0.3, 1.25) var(--d) both,
			nope 6s ease-in-out 2.6s infinite;
	}
	.not-responding {
		animation: blink 1.6s steps(2, jump-none) 1.4s infinite;
	}
	.pointer {
		display: block;
		opacity: 0;
		animation: point 6s ease-in-out 2.6s infinite;
	}
}
@keyframes draw {
	to {
		stroke-dashoffset: 0;
	}
}
@keyframes pop {
	from {
		opacity: 0;
		transform: translateY(28px) rotate(var(--r)) scale(0.9);
	}
	to {
		opacity: 1;
		transform: translateY(0) rotate(var(--r)) scale(1);
	}
}
@keyframes nope {
	0%,
	40%,
	58%,
	100% {
		transform: rotate(var(--r));
	}
	43% {
		transform: translateX(-9px) rotate(var(--r));
	}
	46% {
		transform: translateX(8px) rotate(var(--r));
	}
	49% {
		transform: translateX(-6px) rotate(var(--r));
	}
	52% {
		transform: translateX(4px) rotate(var(--r));
	}
	55% {
		transform: translateX(-2px) rotate(var(--r));
	}
}
@keyframes blink {
	50% {
		opacity: 0.25;
	}
}
@keyframes point {
	0% {
		opacity: 0;
		transform: translate(110px, 70px);
	}
	12% {
		opacity: 1;
	}
	36% {
		opacity: 1;
		transform: translate(0, 0) scale(1);
	}
	39% {
		transform: translate(0, 0) scale(0.82);
	}
	42%,
	70% {
		opacity: 1;
		transform: translate(0, 0) scale(1);
	}
	82%,
	100% {
		opacity: 0;
		transform: translate(30px, 40px);
	}
}

/* Reasons: numbered red circles */
.reasons {
	display: grid;
	gap: 0 48px;
	grid-template-columns: minmax(0, 1fr);
	margin: 32px 0 0;
	padding: 0;
	list-style: none;
	counter-reset: reason;
}
@media (min-width: 760px) {
	.reasons {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}
.reasons li {
	display: grid;
	grid-template-columns: 44px minmax(0, 1fr);
	gap: 2px 16px;
	padding: 18px 0;
	border-top: 1px solid var(--line-strong);
}
.reasons li::before {
	counter-increment: reason;
	content: counter(reason);
	display: grid;
	place-items: center;
	grid-row: 1 / span 2;
	width: 34px;
	height: 34px;
	border: 2px solid var(--ink);
	border-radius: 50%;
	background: var(--accent);
	font-weight: 820;
	font-size: 0.95rem;
}
.reasons span {
	color: var(--ink-2);
}
.after {
	max-width: var(--col);
	margin: 28px 0 0;
	padding: 16px 20px;
	border: 2px dashed var(--line-strong);
	border-radius: var(--radius);
	color: var(--ink-2);
}

/* Before and after table */
.compare-wrap {
	margin-top: 32px;
	overflow-x: auto;
}
.compare {
	width: 100%;
	min-width: 620px;
	border: 2px solid var(--ink);
	border-radius: var(--radius);
	border-collapse: separate;
	border-spacing: 0;
	overflow: hidden;
	background: #fff;
}
.compare th,
.compare td {
	padding: 14px 16px;
	border-bottom: 1px solid var(--line);
	text-align: left;
	vertical-align: top;
}
.compare tbody tr:last-child th,
.compare tbody tr:last-child td {
	border-bottom: 0;
}
.compare thead th {
	background: var(--ink);
	color: #fff;
	font-weight: 700;
}
.compare thead th.good {
	background: var(--accent);
	color: var(--ink);
}
.compare tbody th {
	width: 24%;
	background: var(--panel);
	font-weight: 700;
}
.compare td {
	width: 38%;
	color: var(--muted);
}
.compare .good {
	border-left: 2px solid var(--ink);
}
.compare td.good {
	color: var(--ink);
}

/* Starting-point cards */
.cards {
	display: grid;
	gap: 20px;
	grid-template-columns: minmax(0, 1fr);
	margin-top: 32px;
}
@media (min-width: 760px) {
	.cards {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}
.card {
	padding: 22px 24px;
	border: 2px solid var(--ink);
	border-radius: var(--radius);
	background: #fff;
}
.card h3 {
	display: flex;
	align-items: center;
	gap: 12px;
}
.card p {
	margin: 0;
	color: var(--ink-2);
}
.icon-tile {
	display: grid;
	place-items: center;
	flex: 0 0 auto;
	width: 34px;
	height: 34px;
	border-radius: 8px;
	background: var(--accent-soft);
	color: var(--accent-deep);
	font-size: 0.9rem;
}

/* Steps: big red numbers */
.steps {
	display: grid;
	gap: 28px;
	grid-template-columns: minmax(0, 1fr);
	margin: 36px 0 0;
	padding: 0;
	list-style: none;
	counter-reset: step;
}
@media (min-width: 760px) {
	.steps {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}
.steps li {
	position: relative;
	padding-top: 64px;
}
.steps li::before {
	counter-increment: step;
	content: counter(step);
	position: absolute;
	top: 0;
	left: 0;
	color: var(--accent);
	font-size: 3.4rem;
	font-weight: 850;
	letter-spacing: -0.05em;
	line-height: 1;
}
.steps p {
	margin: 0;
	color: var(--ink-2);
}
.free-note {
	display: flex;
	align-items: flex-start;
	gap: 14px;
	max-width: 46rem;
	margin-top: 36px;
	padding: 18px 22px;
	border-radius: var(--radius);
	background: var(--accent-soft);
}
.free-note i {
	margin-top: 5px;
	color: var(--accent-deep);
}
.free-note p {
	margin: 0;
}

/* Fit */
.fit {
	display: grid;
	gap: 24px;
	grid-template-columns: minmax(0, 1fr);
	margin-top: 28px;
}
@media (min-width: 760px) {
	.fit {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}
.fit > div {
	padding: 24px 26px;
	border: 2px solid var(--ink);
	border-radius: var(--radius);
	background: #fff;
}
.fit > .no {
	border: 2px dashed var(--line-strong);
	background: transparent;
}
.fit ul {
	display: grid;
	gap: 12px;
	margin: 0;
	padding: 0;
	list-style: none;
}
.fit li {
	display: grid;
	grid-template-columns: 22px minmax(0, 1fr);
	gap: 12px;
}
.fit li i {
	margin-top: 5px;
}
.fit .no li i {
	color: var(--muted);
}

/* FAQ */
.faq {
	max-width: 46rem;
	margin-top: 28px;
	border-top: 2px solid var(--ink);
}
.faq details {
	border-bottom: 1px solid var(--line-strong);
}
.faq summary {
	position: relative;
	padding: 18px 40px 18px 0;
	font-size: 1.06rem;
	font-weight: 720;
	list-style: none;
	cursor: pointer;
}
.faq summary::-webkit-details-marker {
	display: none;
}
.faq summary::after {
	content: "+";
	position: absolute;
	top: 12px;
	right: 4px;
	color: var(--accent-deep);
	font-size: 1.6rem;
	font-weight: 500;
}
.faq details[open] summary::after {
	content: "−";
}
.faq .a {
	padding: 0 0 18px;
	color: var(--ink-2);
}
.faq .a p {
	margin: 0;
}

/* Book: dark panel, white form with a red shadow */
section.book {
	border-top: 0;
	background: var(--ink);
	color: #fff;
}
.book-grid {
	display: grid;
	gap: 40px;
	grid-template-columns: minmax(0, 1fr);
}
@media (min-width: 980px) {
	.book-grid {
		grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
		align-items: start;
	}
}
.book-intro .lede,
.book-intro p {
	color: var(--on-ink);
}
.book-intro .tel-link {
	color: #fff;
	text-decoration: underline;
	text-decoration-color: var(--accent);
}
.book-intro a:hover {
	color: var(--accent);
}
.book a:focus-visible {
	outline-color: #fff;
}

/* Enquiry form */
.enquiry {
	display: grid;
	gap: 16px;
	padding: 26px;
	border-radius: 12px;
	background: #fff;
	color: var(--ink);
	box-shadow: 8px 8px 0 var(--accent);
}
.enquiry .row {
	display: grid;
	gap: 16px;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}
.enquiry label {
	display: grid;
	gap: 6px;
	font-size: 0.95rem;
	font-weight: 650;
}
.enquiry .opt {
	color: var(--muted);
	font-weight: 400;
}
.enquiry input,
.enquiry textarea {
	width: 100%;
	padding: 11px 12px;
	border: 2px solid var(--line-strong);
	border-radius: 8px;
	background: #fff;
	color: var(--ink);
	font: inherit;
	font-weight: 400;
}
.enquiry input:focus-visible,
.enquiry textarea:focus-visible {
	border-color: var(--ink);
	outline-offset: 1px;
}
.enquiry textarea {
	min-height: 130px;
	resize: vertical;
}
.enquiry .btn {
	justify-self: start;
	margin-top: 4px;
}
.enquiry .note {
	margin: 4px 0 0;
	color: var(--muted);
	font-size: 0.88rem;
}

/* KEEP: hides the spam trap field. If it's visible, bots aren't caught and people may fill it in. */
.enquiry .hp {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* KEEP: error message shown by /_shared/js/enquiry.js if sending fails */
.form-status {
	padding: 12px 14px;
	border-radius: 8px;
	font-weight: 600;
}
.form-status.err {
	background: #fdecea;
	color: #b42318;
}

/* Footer */
.site-footer {
	padding: 44px 0 36px;
	border-top: 2px solid var(--ink);
	background: #fff;
	font-size: 0.95rem;
}
.site-footer .wrap {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 20px 40px;
}
.site-footer p {
	max-width: 30rem;
	margin: 10px 0 0;
	color: var(--ink-2);
}
.site-footer ul {
	display: grid;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}
.site-footer .legal {
	flex-basis: 100%;
	max-width: none;
	padding-top: 20px;
	border-top: 1px solid var(--line);
	color: var(--muted);
	font-size: 0.86rem;
}

/* Simple pages: privacy, thanks, 404 */
.simple {
	padding: clamp(56px, 9vw, 112px) 0;
}
.simple .col > * {
	max-width: var(--col);
}
.simple h2 {
	margin-top: 1.4em;
	font-size: 1.5rem;
}
