/*
Theme Name: Cim360
Theme URI: https://cim360.cloud/
Author: CIM Software Ltd
Author URI: https://www.cim-software.co.uk/
Description: Block theme for the public Cim360.cloud website.
Version: 0.3.0
Requires at least: 6.9
Requires PHP: 8.1
License: Proprietary
Text Domain: cim360
*/

/* ---------- Focus (WCAG 2.4.7 / 2.4.11) ---------- */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
	outline: 3px solid #f2b705;
	outline-offset: 2px;
}

/* An amber button swallows the amber ring: white on dark grounds, primary-dark on light ones. */
.wp-block-button.is-style-accent .wp-block-button__link:focus-visible {
	outline-color: var(--wp--preset--color--primary-dark);
}

:is(.c360-topbar, .c360-hero, .c360-band, .c360-footer) .wp-block-button.is-style-accent .wp-block-button__link:focus-visible {
	outline-color: #ffffff;
}

.wp-block-button__link:hover {
	filter: brightness(1.06);
}

.wp-block-button.is-style-white .wp-block-button__link:hover {
	filter: none;
	background: var(--wp--preset--color--surface);
}

/* ---------- Layout helpers ---------- */
.wp-site-blocks > * + * {
	margin-block-start: 0;
}

.wp-block-post-content > .alignfull {
	margin-block-start: 0;
	margin-block-end: 0;
}

.c360-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
	gap: 24px;
}

.c360-grid--240 {
	grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
	gap: 0;
}

.c360-grid--170 {
	grid-template-columns: repeat(auto-fit, minmax(min(170px, 100%), 1fr));
	gap: 12px;
}

.c360-grid > *,
.c360-stack > *,
.c360-split > *,
.c360-tile > * {
	margin: 0;
}

.c360-stack {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.c360-split {
	display: flex;
	flex-wrap: wrap;
	gap: 56px;
	align-items: center;
}

.c360-split > * {
	flex: 1 1 440px;
	min-width: 0;
}

.c360-split--top {
	align-items: stretch;
}

/* ---------- Eyebrow ---------- */
.c360-eyebrow {
	margin: 0;
	font-size: 13px;
	font-weight: 800;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--wp--preset--color--primary);
}

:is(.c360-band, .c360-hero) .c360-eyebrow {
	color: #9fd0f5;
}

/* ---------- Tile (the app's tile) ---------- */
.c360-tile {
	position: relative;
	top: 0;
	display: flex;
	flex-direction: column;
	min-width: 0;
	overflow: hidden;
	padding: 15px 16px 13px;
	background: #ffffff;
	border: 1px solid #d6dbe1;
	border-radius: 12px;
	box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
	transition: top 0.2s cubic-bezier(0.2, 0.7, 0.2, 1), box-shadow 0.2s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.c360-tile:hover {
	top: -2px;
	box-shadow: 0 10px 24px -10px rgba(15, 23, 42, 0.25);
}

.c360-tile-head {
	display: flex;
	align-items: flex-start;
	gap: 9px;
	min-width: 0;
}

.c360-tile-icon {
	width: 28px;
	height: 28px;
	border-radius: 8px;
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	justify-content: center;
	background: color-mix(in srgb, var(--tile-accent, #1d75bb) 10%, #ffffff);
	color: color-mix(in srgb, var(--tile-accent, #1d75bb) 70%, #111827);
}

.c360-tile-label {
	min-height: 28px;
	display: flex;
	align-items: center;
	margin: 0;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.01em;
	color: #374151;
	line-height: 1.25;
}

.c360-tile-sub {
	font-size: 14px;
	font-weight: 500;
	color: #4b5563;
	margin: 4px 0 0;
	line-height: 1.5;
}

.c360-tile--warn {
	--tile-accent: #d97706;
}

/* Roomier tile for the benefit and quote cards. */
.c360-tile--roomy {
	padding: 26px;
	gap: 12px;
}

.c360-tile--roomy .c360-tile-head {
	flex-direction: column;
	gap: 12px;
}

.c360-tile--roomy .c360-tile-icon {
	width: 44px;
	height: 44px;
}

.c360-tile--roomy .c360-tile-label {
	min-height: 0;
	font-size: 19px;
	font-weight: 800;
	letter-spacing: 0;
	color: var(--wp--preset--color--ink);
}

.c360-tile--roomy .c360-tile-sub {
	margin: 0;
	font-size: 16px;
	line-height: 1.6;
}

.c360-quote-text {
	font-size: 17px;
	font-weight: 700;
	line-height: 1.5;
	color: var(--wp--preset--color--ink);
}

.c360-quote-name {
	font-weight: 900;
	color: var(--wp--preset--color--primary-dark);
}

.c360-quote-role {
	font-size: 14px;
	color: var(--wp--preset--color--muted);
}

/* Solid icon chip for the differentiators. */
.c360-icon-solid {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	background: var(--wp--preset--color--primary);
	color: #ffffff;
}

.c360-diff {
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding: 24px 24px 4px 0;
}

.c360-diff h3 {
	font-size: 18px;
}

.c360-diff p {
	font-size: 15px;
	line-height: 1.6;
	color: var(--wp--preset--color--muted);
}

.c360-diff-grid {
	border-top: 1px solid var(--wp--preset--color--line);
}

/* ---------- Band (dotted gradient) ---------- */
.c360-band {
	position: relative;
	isolation: isolate;
	overflow: hidden;
	background: linear-gradient(100deg, #0f3f6b 0%, #155389 50%, #1d75bb 100%);
	color: #ffffff;
}

.c360-band::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background-image: radial-gradient(rgba(255, 255, 255, 0.09) 1px, transparent 1px);
	background-size: 18px 18px;
	-webkit-mask-image: linear-gradient(270deg, #000 0%, transparent 60%);
	mask-image: linear-gradient(270deg, #000 0%, transparent 60%);
}

.c360-band :where(h1, h2, h3, h4) {
	color: #ffffff;
}

.c360-band a {
	color: #ffffff;
}

/* ---------- Check list ---------- */
.c360-check-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr));
	gap: 10px;
}

.c360-check-list li {
	position: relative;
	margin: 0;
	padding-left: 28px;
	font-size: 15px;
}

.c360-check-list li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0.2em;
	width: 18px;
	height: 18px;
	background: var(--wp--preset--color--success);
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.6'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.6'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E") center / contain no-repeat;
}

.c360-band .c360-check-list li {
	color: var(--wp--preset--color--on-dark);
}

.c360-band .c360-check-list li::before {
	background: #7fc0f0;
}

.c360-band .c360-check-list strong {
	color: #ffffff;
}

/* ---------- Platform chips ---------- */
.c360-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin: 8px 0 0;
	padding: 0;
	list-style: none;
}

.c360-chip {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	margin: 0;
	padding: 10px 16px;
	min-height: 44px;
	box-sizing: border-box;
	background: #ffffff;
	border: 1px solid #e4e8ed;
	border-radius: 10px;
	box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 4px 12px rgba(15, 23, 42, 0.06);
	font-weight: 800;
	color: #1f2937;
}

/* ---------- Photo with chip ---------- */
.c360-photo {
	position: relative;
	overflow: hidden;
	min-height: 520px;
	box-shadow: 0 30px 70px -20px rgba(10, 40, 75, 0.45);
}

.c360-photo .wp-block-image,
.c360-photo .wp-block-image img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	margin: 0;
	object-fit: cover;
	object-position: 60% 50%;
	display: block;
	max-width: none;
}

.c360-chip-note {
	position: absolute !important;
	left: 20px;
	bottom: 20px;
	margin: 0;
	display: flex;
	align-items: center;
	gap: 12px;
	max-width: calc(100% - 40px);
	padding: 14px 18px;
	background: #ffffff;
	box-shadow: 0 16px 36px rgba(5, 25, 50, 0.4);
	font-weight: 900;
	font-size: 17px;
	color: #1f2937;
	animation: c360-fade-up 0.9s 0.5s cubic-bezier(0.2, 0.7, 0.2, 1) both, c360-float 7s 1.4s ease-in-out infinite;
}

.c360-chip-note p {
	margin: 0;
}

.c360-pulse-dot {
	flex: none;
	width: 11px;
	height: 11px;
	border-radius: 50%;
	background: var(--wp--preset--color--success);
}

/* ---------- Hero ---------- */
.c360-hero {
	position: relative;
	isolation: isolate;
	overflow: hidden;
	background: #0f3f6b;
	min-height: 640px;
	color: #ffffff;
}

.c360-hero::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 3px;
	background: #5aa3db;
}

.c360-hero > .c360-hero-photo,
.c360-hero > .c360-hero-shade,
.c360-hero > .c360-hero-dots {
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	width: 100%;
	max-width: none;
}

.c360-hero-photo {
	z-index: -3;
	overflow: hidden;
}

.c360-hero-photo img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: 80% 40%;
	animation: c360-kenburns 26s ease-in-out infinite alternate;
}

.c360-hero-shade {
	z-index: -2;
	background: linear-gradient(90deg, rgba(15, 63, 107, 0.94) 0%, rgba(15, 63, 107, 0.82) 34%, rgba(15, 63, 107, 0.28) 56%, rgba(15, 63, 107, 0) 72%);
}

.c360-hero-dots {
	z-index: -1;
	background-image: radial-gradient(rgba(255, 255, 255, 0.1) 1px, transparent 1px);
	background-size: 18px 18px;
	-webkit-mask-image: linear-gradient(90deg, #000 0%, rgba(0, 0, 0, 0.4) 35%, transparent 55%);
	mask-image: linear-gradient(90deg, #000 0%, rgba(0, 0, 0, 0.4) 35%, transparent 55%);
}

.c360-hero > .c360-hero-mark {
	position: absolute;
	left: -140px;
	bottom: -160px;
	width: 460px;
	height: 460px;
	max-width: none;
	opacity: 0.06;
	z-index: -1;
	animation: c360-spin 40s linear infinite;
}

.c360-hero-copy {
	display: flex;
	flex-direction: column;
	gap: 22px;
	max-width: 600px;
}

.c360-hero-copy > * {
	margin: 0;
}

.c360-hero h1 {
	color: #ffffff;
	letter-spacing: -1.2px;
}

.c360-hero-sub {
	color: var(--wp--preset--color--on-dark);
}

.c360-hero-brit {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 22px;
	margin-top: 14px;
}

.c360-hero-brit > * {
	margin: 0;
}

.c360-hero-brit .wp-block-image {
	flex: none;
}

.c360-hero-brit img {
	display: block;
	height: 44px;
	width: auto;
	max-width: none;
}

.c360-hero-brit p {
	max-width: 280px;
	font-size: 15px;
	color: #d8e8f6;
}

.c360-hero-brit .c360-vr {
	width: 1px;
	height: 36px;
	background: rgba(255, 255, 255, 0.3);
}

@media (max-width: 899px) {
	.c360-hero-shade {
		background: rgba(15, 63, 107, 0.86);
	}

	.c360-hero > .c360-hero-mark {
		display: none;
	}
}

/* ---------- Entrance animation ---------- */
.c360-fu {
	animation: c360-fade-up 0.8s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.c360-d1 {
	animation-delay: 0.08s;
}

.c360-d2 {
	animation-delay: 0.18s;
}

.c360-d3 {
	animation-delay: 0.3s;
}

.c360-d4 {
	animation-delay: 0.42s;
}

.c360-d5 {
	animation-delay: 0.56s;
}

@keyframes c360-fade-up {
	from {
		opacity: 0;
		transform: translateY(18px);
	}

	to {
		opacity: 1;
		transform: none;
	}
}

@keyframes c360-float {
	0%,
	100% {
		transform: translateY(0);
	}

	50% {
		transform: translateY(-10px);
	}
}

@keyframes c360-kenburns {
	from {
		transform: scale(1.02);
	}

	to {
		transform: scale(1.12) translateX(-2%);
	}
}

@keyframes c360-spin {
	to {
		transform: rotate(360deg);
	}
}

/* ---------- Page intro and feature sections ---------- */
.c360-feature-img img {
	display: block;
	width: 100%;
	height: auto;
	box-shadow: 0 30px 70px -20px rgba(10, 40, 75, 0.45);
}

.c360-feature--reverse {
	flex-direction: row-reverse;
}

.c360-media-shadow img {
	display: block;
	width: 100%;
	height: auto;
	box-shadow: 0 30px 70px -20px rgba(0, 0, 0, 0.6);
}

/* ---------- Header ---------- */
header.wp-block-template-part {
	position: sticky;
	top: 0;
	z-index: 20;
}

.admin-bar header.wp-block-template-part {
	top: var(--wp-admin--admin-bar--height, 32px);
}

.c360-topbar {
	position: relative;
	background: linear-gradient(100deg, #155389 0%, #1d75bb 55%, #2f86cc 100%);
	box-shadow: 0 8px 20px -10px rgba(10, 40, 75, 0.45);
}

.c360-topbar::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 2px;
	background: #5aa3db;
}

.c360-topbar-row {
	min-height: 76px;
}

.c360-topbar-row > * {
	margin: 0;
}

.c360-logo img {
	display: block;
	height: 38px;
	width: auto;
}

.c360-nav .wp-block-navigation-item__content {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	font-weight: 700;
	font-size: 16px;
	text-decoration: none;
}

.c360-nav .wp-block-navigation-item__content:hover {
	text-decoration: underline;
	text-underline-offset: 6px;
}

.c360-nav .wp-block-navigation__responsive-container-open {
	min-width: 44px;
	min-height: 44px;
	align-items: center;
	justify-content: center;
}

.c360-nav .c360-nav-mobile-only {
	display: none;
}

.c360-nav .is-menu-open .c360-nav-mobile-only {
	display: block;
}

/* The navigation collapses to a menu button below 900px, as the mockup does. */
@media (max-width: 899px) {
	.c360-nav .wp-block-navigation__responsive-container:not(.is-menu-open) {
		display: none;
	}

	.c360-nav .wp-block-navigation__responsive-container-open:not(.always-shown) {
		display: flex;
	}
}

@media (max-width: 599px) {
	.c360-topbar-buttons {
		display: none;
	}

	.c360-logo img {
		height: 32px;
	}
}

/* ---------- Footer ---------- */
.c360-footer {
	background: #13202d;
	color: var(--wp--preset--color--on-dark);
}

.c360-footer a {
	color: var(--wp--preset--color--on-dark);
}

.c360-footer a:hover {
	color: #ffffff;
}

.c360-footer .c360-footer-heading {
	margin: 0 0 12px;
	font-size: 16px;
	font-weight: 900;
	color: #ffffff;
}

.c360-footer-links {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.c360-footer-links a {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
}

.c360-footer-logo img {
	height: 38px;
	width: auto;
	display: block;
}

.c360-footer-bottom {
	border-top: 1px solid rgba(255, 255, 255, 0.16);
	padding-top: 24px;
	margin-top: 40px;
}

.c360-footer-bottom img {
	height: 40px;
	width: auto;
}

/* ---------- Photo tile (Features hub modules) ---------- */
.c360-photo-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr));
	gap: 20px;
}

.c360-photo-tile {
	position: relative;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	gap: 16px;
	min-height: 300px;
	padding: 22px 20px;
	overflow: hidden;
	isolation: isolate;
	border-radius: 12px;
	color: #ffffff;
	text-decoration: none;
	text-align: center;
	background: linear-gradient(160deg, #155389, #0b2a4a);
}

/* The photo sits on its own layer so it can zoom without moving the text. */
.c360-photo-tile::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -2;
	background: var(--tile-img, none) center / cover no-repeat;
	transition: transform 0.5s cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* A 60% black overlay keeps white text readable over any photo. */
.c360-photo-tile::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background: rgba(0, 0, 0, 0.6);
}

.c360-photo-tile:hover::before,
.c360-photo-tile:focus-visible::before {
	transform: scale(1.06);
}

.c360-photo-tile__title {
	margin: 0;
	font-size: 22px;
	font-weight: 800;
	line-height: 1.2;
	color: #ffffff;
}

.c360-photo-tile__text {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin: 0;
	font-size: 15px;
	font-weight: 500;
	line-height: 1.5;
}

.c360-photo-tile__when {
	align-self: center;
	padding: 2px 10px;
	border: 1px solid rgba(255, 255, 255, 0.7);
	border-radius: 999px;
	font-size: 13px;
	font-weight: 700;
}

/* The description slides up once as the tile scrolls into view. Only hidden while the reveal
   script runs, so without it the text simply shows. */
.c360-reveal-on .c360-photo-tile__text {
	opacity: 0;
	transform: translateY(28px);
	transition: opacity 0.6s ease-out, transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.c360-reveal-on .c360-photo-tile.is-in .c360-photo-tile__text {
	opacity: 1;
	transform: none;
}

/* ---------- Free trial not open yet (cim360-site trial-soon.php) ---------- */
.c360-trial-soon {
	position: relative;
	cursor: not-allowed;
	user-select: none;
}

.c360-trial-soon__sticker {
	position: absolute;
	top: -11px;
	right: -10px;
	z-index: 1;
	padding: 3px 8px;
	border-radius: 6px;
	border: 1px solid #155389;
	background: #ffffff;
	color: #155389;
	font-size: 11px;
	font-weight: 800;
	line-height: 1.2;
	letter-spacing: 0.02em;
	white-space: nowrap;
	transform: rotate(6deg);
	box-shadow: 0 3px 8px rgba(15, 23, 42, 0.3);
	pointer-events: none;
}

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

	.c360-tile:hover {
		top: 0;
	}

	.c360-photo-tile:hover::before,
	.c360-photo-tile:focus-visible::before {
		transform: none;
	}

	.c360-reveal-on .c360-photo-tile__text {
		opacity: 1;
		transform: none;
	}
}
