/* ==========================================================================
   Malizia Sign — 2026 design system
   Shared tokens + component classes used by every page's Elementor HTML block.
   ========================================================================== */

:root {
	--ms-ink: #0b0d10;
	--ms-ink-soft: #1a1d21;
	--ms-paper: #fafafa;
	--ms-paper-raised: #ffffff;
	--ms-accent: #f6821f;
	--ms-accent-dim: #c2600f;
	--ms-accent-soft: #fde8d3;
	--ms-steel: #6b7280;
	--ms-steel-dim: #9aa1ab;
	--ms-line: rgba(11,13,16,0.09);
	--ms-line-strong: rgba(11,13,16,0.16);
	--ms-ease: cubic-bezier(0.16,1,0.3,1);
	--ms-maxw: 1240px;
	--ms-on-dark: rgba(255,255,255,0.86);
	--ms-on-dark-dim: rgba(255,255,255,0.65);
}

@media (prefers-color-scheme: dark) {
	:root {
		--ms-ink: #f2f1ee;
		--ms-ink-soft: #e4e2dd;
		--ms-paper: #0b0d10;
		--ms-paper-raised: #15181c;
		--ms-accent: #ff9a42;
		--ms-accent-dim: #ffb168;
		--ms-accent-soft: rgba(255,154,66,0.14);
		--ms-steel: #a8adb5;
		--ms-steel-dim: #74797f;
		--ms-line: rgba(255,255,255,0.1);
		--ms-line-strong: rgba(255,255,255,0.18);
	}
}
html[data-ms-theme="dark"] {
	--ms-ink: #f2f1ee; --ms-ink-soft: #e4e2dd; --ms-paper: #0b0d10; --ms-paper-raised: #15181c;
	--ms-accent: #ff9a42; --ms-accent-dim: #ffb168; --ms-accent-soft: rgba(255,154,66,0.14);
	--ms-steel: #a8adb5; --ms-steel-dim: #74797f; --ms-line: rgba(255,255,255,0.1); --ms-line-strong: rgba(255,255,255,0.18);
}
html[data-ms-theme="light"] {
	--ms-ink: #0b0d10; --ms-ink-soft: #1a1d21; --ms-paper: #fafafa; --ms-paper-raised: #ffffff;
	--ms-accent: #f6821f; --ms-accent-dim: #c2600f; --ms-accent-soft: #fde8d3;
	--ms-steel: #6b7280; --ms-steel-dim: #9aa1ab; --ms-line: rgba(11,13,16,0.09); --ms-line-strong: rgba(11,13,16,0.16);
}

/* ==========================================================================
   Shared components, namespaced .ms- — used inside Elementor HTML widgets
   ========================================================================== */
.ms-page { font-family: 'Public Sans', -apple-system, sans-serif; color: var(--ms-ink); background: var(--ms-paper); }
.ms-page * { box-sizing: border-box; }
.ms-page img { max-width: 100%; display: block; }
.ms-wrap { max-width: var(--ms-maxw); margin: 0 auto; padding: 0 32px; }

.ms-page h1, .ms-page h2, .ms-page h3, .ms-page h4 {
	font-family: 'Archivo', sans-serif;
	font-weight: 800;
	letter-spacing: -0.01em;
	line-height: 1.08;
	margin: 0;
	text-wrap: balance;
	color: var(--ms-ink);
}
.ms-eyebrow {
	font-family: 'Public Sans', sans-serif; font-weight: 700; font-size: 0.75rem;
	letter-spacing: 0.16em; text-transform: uppercase; color: var(--ms-accent);
	display: inline-block;
}

/* Page hero (interior pages: shorter than homepage) */
.ms-page-hero {
	position: relative; padding: 168px 0 88px; color: #fff;
	background: linear-gradient(180deg, rgba(4,6,8,0.45) 0%, rgba(4,6,8,0.62) 60%, rgba(4,6,8,0.94) 100%), center/cover no-repeat;
}
.ms-page-hero .ms-eyebrow { color: var(--ms-accent-dim); margin-bottom: 18px; }
.ms-page-hero h1 { font-size: clamp(2.4rem, 5vw, 4.2rem); color: #fff; max-width: 20ch; }
.ms-page-hero p { max-width: 52ch; margin-top: 20px; font-size: 1.1rem; color: rgba(255,255,255,0.82); }

.ms-section { padding: 96px 0; border-top: 1px solid var(--ms-line); }
.ms-section:first-of-type { border-top: none; }
.ms-section-tight { padding: 64px 0; }
.ms-section-alt { background: var(--ms-paper-raised); border-top: 1px solid var(--ms-line); border-bottom: 1px solid var(--ms-line); }
.ms-section-dark {
	background: var(--ms-ink); color: var(--ms-on-dark);
	background-image: radial-gradient(circle at 15% 20%, rgba(246,130,31,0.14), transparent 45%), radial-gradient(circle at 85% 80%, rgba(246,130,31,0.10), transparent 45%);
	border-top: 1px solid rgba(255,255,255,0.08);
	border-bottom: 1px solid rgba(255,255,255,0.08);
}
html[data-ms-theme="dark"] .ms-section-dark, @media (prefers-color-scheme: dark) { .ms-section-dark { background: #101318; } }
.ms-section-dark h1, .ms-section-dark h2, .ms-section-dark h3, .ms-section-dark h4 { color: #fff; }
.ms-section-dark p, .ms-section-dark .ms-body { color: var(--ms-on-dark-dim); }
.ms-section-dark .ms-eyebrow { color: var(--ms-accent-dim); }

/* ---- Gallery section: subtle raised tone to separate from the dark stats band above it ---- */
.ms-gallery-section { background: var(--ms-paper-raised); }

/* ---- Certificate cards: hover lift, same interaction language as the rest of the site ---- */
.ms-cert-grid a:hover { transform: translateY(-4px); }

.ms-section-head { max-width: 640px; margin-bottom: 48px; }
.ms-section-head h2 { font-size: clamp(1.9rem, 3.2vw, 2.75rem); margin-top: 12px; }
.ms-section-head p { color: var(--ms-steel); font-size: 1.02rem; margin-top: 14px; max-width: 58ch; }

.ms-body, .ms-page p, .ms-page li { color: var(--ms-steel); font-size: 1.0625rem; line-height: 1.65; }
.ms-page strong { color: var(--ms-ink); }

/* Buttons */
.ms-btn {
	display: inline-flex; align-items: center; gap: 10px; font-family: 'Public Sans', sans-serif;
	font-weight: 700; font-size: 0.9375rem; text-decoration: none; padding: 15px 30px;
	border-radius: 999px; border: none; cursor: pointer;
	transition: transform 0.35s var(--ms-ease), box-shadow 0.35s var(--ms-ease), background 0.3s var(--ms-ease);
}
.ms-btn-primary { background: var(--ms-accent); color: #17110a; }
.ms-btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(246,130,31,0.35); color: #17110a; }
.ms-btn-ghost { background: transparent; color: var(--ms-ink); border: 1px solid var(--ms-line-strong); }
.ms-btn-ghost:hover { background: var(--ms-ink); color: var(--ms-paper); transform: translateY(-2px); }
.ms-btn-ghost-dark { background: rgba(255,255,255,0.08); color: #fff; border: 1px solid rgba(255,255,255,0.35); }
.ms-btn-ghost-dark:hover { background: rgba(255,255,255,0.16); transform: translateY(-2px); color: #fff; }

/* Cards */
.ms-card {
	background: var(--ms-paper-raised); border: 1px solid var(--ms-line); border-radius: 16px;
	padding: 36px 32px; transition: transform 0.4s var(--ms-ease), box-shadow 0.4s var(--ms-ease);
}
.ms-card:hover { transform: translateY(-4px); box-shadow: 0 20px 40px rgba(0,0,0,0.08); }
.ms-card-icon {
	width: 48px; height: 48px; border-radius: 12px; background: var(--ms-accent-soft);
	display: flex; align-items: center; justify-content: center; color: var(--ms-accent); margin-bottom: 18px;
}
.ms-card-icon img { width: 24px; height: 24px; }
.ms-card h3 { font-size: 1.2rem; margin-bottom: 10px; }

/* Grid helpers */
.ms-grid { display: grid; gap: 28px; }
.ms-grid-2 { grid-template-columns: repeat(2, 1fr); }
.ms-grid-3 { grid-template-columns: repeat(3, 1fr); }
.ms-grid-4 { grid-template-columns: repeat(4, 1fr); }

/* Stats band */
.ms-stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: rgba(255,255,255,0.1); margin-top: 48px; border-radius: 20px; overflow: hidden; }
.ms-stat { background: #101318; padding: 40px 28px; }
.ms-stat-num { font-family: 'Archivo', sans-serif; font-weight: 900; font-size: clamp(2rem, 3.2vw, 2.75rem); color: var(--ms-accent); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.ms-stat-label { color: rgba(255,255,255,0.65); font-size: 0.92rem; margin-top: 8px; }

/* Gallery mosaic */
.ms-gallery-grid { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 220px; grid-auto-flow: dense; gap: 4px; border-radius: 20px; overflow: hidden; }
.ms-gallery-grid a { position: relative; overflow: hidden; display: block; }
.ms-gallery-grid img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--ms-ease); }
.ms-gallery-grid a:hover img { transform: scale(1.08); }
.ms-gallery-grid a::after {
	content: attr(data-label); position: absolute; left: 0; right: 0; bottom: 0; padding: 16px 18px;
	background: linear-gradient(0deg, rgba(0,0,0,0.75), transparent); color: #fff; font-weight: 700; font-size: 0.82rem;
	opacity: 0; transform: translateY(8px); transition: opacity 0.35s var(--ms-ease), transform 0.35s var(--ms-ease);
}
.ms-gallery-grid a:hover::after { opacity: 1; transform: translateY(0); }
.ms-g-wide { grid-column: span 2; }
.ms-g-tall { grid-row: span 2; }

/* Clients / logo strip */
.ms-logo-strip { display: flex; align-items: center; gap: 44px; flex-wrap: wrap; }
.ms-logo-strip img { height: 30px; width: auto; object-fit: contain; filter: grayscale(1) opacity(0.55); transition: filter 0.3s var(--ms-ease); }
.ms-logo-strip img:hover { filter: grayscale(0) opacity(1); }

/* Forms */
.ms-page input[type="text"], .ms-page input[type="email"], .ms-page input[type="tel"],
.ms-page input[type="number"], .ms-page textarea, .ms-page select,
.ms-static-form input, .ms-static-form textarea, .ms-static-form select {
	border-radius: 10px; border: 1px solid var(--ms-line-strong);
	padding: 14px 16px; font-size: 1rem; font-family: 'Public Sans', sans-serif;
	background: var(--ms-paper-raised); color: var(--ms-ink);
	transition: border-color 0.3s var(--ms-ease), box-shadow 0.3s var(--ms-ease);
	width: 100%;
}
.ms-page input:focus, .ms-page textarea:focus, .ms-static-form input:focus, .ms-static-form textarea:focus {
	border-color: var(--ms-accent); box-shadow: 0 0 0 4px var(--ms-accent-soft); outline: none;
}
.ms-page button[type="submit"], .ms-static-form button[type="submit"] {
	background: var(--ms-accent); color: #17110a; border: none;
	border-radius: 999px; font-weight: 700; padding: 14px 30px;
}

/* Static form layout */
.ms-static-form { display: flex; flex-direction: column; gap: 16px; }
.ms-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.ms-form-field { display: flex; flex-direction: column; gap: 6px; }
.ms-form-field label { font-size: 0.8125rem; font-weight: 600; color: var(--ms-steel); }
.ms-static-form button[type="submit"] { align-self: flex-start; }
.ms-form-status { font-size: 0.875rem; margin: 0; min-height: 1.2em; }
.ms-form-status.is-success { color: #1a9e5c; }
.ms-form-status.is-error { color: #d64545; }
@media (max-width: 600px) {
	.ms-form-row { grid-template-columns: 1fr; }
}

/* Compact variant: used in the hero quote card, a narrower container */
.ms-static-form-compact { gap: 14px; }
.ms-static-form-compact .ms-form-field input,
.ms-static-form-compact .ms-form-field textarea { padding: 12px 14px; font-size: 0.9375rem; }
.ms-static-form-compact button[type="submit"] { width: 100%; text-align: center; justify-content: center; }

/* Contact / info list */
.ms-info-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 16px; }
.ms-info-list li { display: flex; align-items: flex-start; gap: 14px; font-size: 1rem; color: var(--ms-ink-soft); padding-bottom: 16px; border-bottom: 1px solid var(--ms-line); }
.ms-info-list li:last-child { border-bottom: none; padding-bottom: 0; }
.ms-info-list svg { flex-shrink: 0; width: 20px; height: 20px; color: var(--ms-accent); margin-top: 2px; }

/* CTA band */
.ms-cta-band { background: linear-gradient(135deg, var(--ms-ink) 0%, #23180d 100%); color: #fff; text-align: center; padding: 100px 0; }
.ms-cta-band h2 { font-size: clamp(2rem, 4vw, 3.2rem); color: #fff; max-width: 18ch; margin: 0 auto; }
.ms-cta-band p { color: rgba(255,255,255,0.65); margin-top: 18px; font-size: 1.05rem; }
.ms-cta-actions { display: flex; gap: 16px; justify-content: center; margin-top: 40px; flex-wrap: wrap; }

/* Fix: low-contrast text sections from the old site (orange-on-white, white-on-light) */
.ms-page .ms-body strong,
.ms-page .ms-fix-contrast,
.ms-page .ms-fix-contrast p,
.ms-page .ms-fix-contrast li {
	color: var(--ms-ink-soft) !important;
}

/* Reveal on scroll */
@media (prefers-reduced-motion: no-preference) {
	.ms-reveal { opacity: 0; transform: translateY(20px); transition: opacity 0.8s var(--ms-ease), transform 0.8s var(--ms-ease); }
	.ms-reveal.is-visible { opacity: 1; transform: translateY(0); }
}

/* Theme toggle */
.ms-theme-toggle {
	width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--ms-line-strong);
	display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
	background: transparent; color: var(--ms-ink-soft); transition: all 0.3s var(--ms-ease);
}
.ms-theme-toggle:hover { border-color: var(--ms-accent); color: var(--ms-accent); }
.ms-theme-toggle svg { width: 18px; height: 18px; }
.ms-theme-toggle .ms-icon-moon { display: none; }
html[data-ms-theme="dark"] .ms-theme-toggle .ms-icon-sun { display: none; }
html[data-ms-theme="dark"] .ms-theme-toggle .ms-icon-moon { display: block; }
@media (prefers-color-scheme: dark) {
	html:not([data-ms-theme="light"]) .ms-theme-toggle .ms-icon-sun { display: none; }
	html:not([data-ms-theme="light"]) .ms-theme-toggle .ms-icon-moon { display: block; }
}

/* ---- Homepage hero: headline + quote-card grid ---- */
.ms-hero-home {
	min-height: 92vh; display: flex; align-items: center;
	padding-top: 120px; padding-bottom: 60px;
}
.ms-hero-home-grid {
	width: 100%; display: grid; grid-template-columns: 1.1fr 0.9fr;
	gap: 56px; align-items: center;
}

/* Responsive */
@media (max-width: 960px) {
	.ms-grid-3, .ms-grid-4 { grid-template-columns: repeat(2, 1fr); }
	.ms-stats-grid { grid-template-columns: repeat(2, 1fr); }
	.ms-gallery-grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 180px; }
	.ms-hero-home-grid { grid-template-columns: 1fr; gap: 36px; }
}
@media (max-width: 600px) {
	.ms-hero-home { min-height: 0; padding-top: 96px; padding-bottom: 40px; }
	.ms-hero-home-grid { gap: 28px; }
	#get-a-quote { padding: 22px !important; }
	.ms-gallery-grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 150px; gap: 3px; }
	.ms-g-wide { grid-column: span 2; }
	.ms-g-tall { grid-row: span 1; }
	.ms-clients-strip { padding: 40px 0 !important; }
	.ms-stats-grid { grid-template-columns: repeat(2, 1fr); gap: 1px; }
	.ms-stat { padding: 24px 16px; }
	.ms-cta-band .ms-cta-actions { flex-direction: column; align-items: stretch; }
	.ms-cta-band .ms-btn { justify-content: center; }
}
/* ---- Fixed header theme toggle ---- */
.ms-theme-toggle-fixed {
	position: fixed; top: 16px; right: 24px; z-index: 600;
	background: var(--ms-paper-raised);
}
@media (max-width: 600px) { .ms-theme-toggle-fixed { top: 12px; right: 16px; width: 34px; height: 34px; } }

/* ---- Floating WhatsApp button ---- */
.ms-whatsapp-fab {
	position: fixed; bottom: 24px; right: 24px; z-index: 600;
	width: 56px; height: 56px; border-radius: 50%;
	background: #25D366; color: #fff; display: flex; align-items: center; justify-content: center;
	box-shadow: 0 8px 24px rgba(37,211,102,0.4);
	transition: transform 0.3s var(--ms-ease), box-shadow 0.3s var(--ms-ease);
	text-decoration: none;
}
.ms-whatsapp-fab:hover { transform: scale(1.08); box-shadow: 0 12px 32px rgba(37,211,102,0.5); color: #fff; }
.ms-whatsapp-fab svg { width: 28px; height: 28px; }
@media (max-width: 600px) { .ms-whatsapp-fab { width: 50px; height: 50px; bottom: 16px; right: 16px; } .ms-whatsapp-fab svg { width: 24px; height: 24px; } }

/* ---- Stats band: fix low-contrast label/value pairing ---- */
.ms-stats-grid { background: rgba(255,255,255,0.08); }
.ms-stat { background: #14171c; }
.ms-stat-num { color: var(--ms-accent); }
.ms-stat-label { color: rgba(255,255,255,0.78); font-weight: 500; }

/* ---- "Track record" heading directly on dark band: force readable ---- */
.ms-section-dark .ms-section-head h2,
.ms-section-dark > .ms-wrap > h2 { color: #fff !important; }
.ms-section-dark .ms-eyebrow { color: var(--ms-accent-dim) !important; }

/* ---- Chairman / message section: ensure body text has real contrast ---- */
.ms-message-quote { color: var(--ms-ink) !important; }
.ms-message-name { color: var(--ms-ink) !important; font-weight: 700; }
.ms-message-role { color: var(--ms-steel) !important; }

/* ---- Clients logo carousel ---- */
.ms-logo-carousel {
	overflow: hidden; position: relative;
	-webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
	mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.ms-logo-track {
	display: flex; align-items: center; gap: 20px; width: max-content;
	animation: ms-scroll 150s linear infinite;
}
.ms-logo-carousel:hover .ms-logo-track { animation-play-state: paused; }
.ms-logo-track img {
	height: 64px; width: 64px; object-fit: contain; flex-shrink: 0;
	background: #fff; border-radius: 12px; padding: 10px;
	box-shadow: 0 1px 3px rgba(0,0,0,0.15);
	transition: transform 0.3s var(--ms-ease); box-sizing: border-box;
}
.ms-logo-track img:hover { transform: translateY(-3px); }
@keyframes ms-scroll {
	from { transform: translateX(0); }
	to { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
	.ms-logo-track { animation: none; overflow-x: auto; }
}

/* ---- Inline lead form ---- */
.ms-lead-form { display: grid; gap: 14px; }
.ms-lead-form .ms-lead-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.ms-lead-form input, .ms-lead-form select, .ms-lead-form textarea {
	width: 100%; border-radius: 10px; border: 1px solid rgba(255,255,255,0.25);
	padding: 14px 16px; font-size: 0.95rem; font-family: 'Public Sans', sans-serif;
	background: rgba(255,255,255,0.08); color: #fff;
}
.ms-lead-form input::placeholder, .ms-lead-form textarea::placeholder { color: rgba(255,255,255,0.5); }
.ms-lead-form input:focus, .ms-lead-form select:focus, .ms-lead-form textarea:focus {
	border-color: var(--ms-accent); outline: none; background: rgba(255,255,255,0.12);
}
.ms-lead-form-light input, .ms-lead-form-light select, .ms-lead-form-light textarea {
	background: var(--ms-paper-raised); color: var(--ms-ink); border: 1px solid var(--ms-line-strong);
}
.ms-lead-form-light input::placeholder, .ms-lead-form-light textarea::placeholder { color: var(--ms-steel-dim); }
.ms-lead-note { font-size: 0.8125rem; color: rgba(255,255,255,0.5); margin-top: 4px; }
.ms-lead-form-light .ms-lead-note { color: var(--ms-steel); }
@media (max-width: 600px) {
	.ms-lead-form .ms-lead-row { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
	.ms-wrap { padding: 0 20px; }
	.ms-section { padding: 64px 0; }
	.ms-page-hero { padding: 128px 0 56px; }
	.ms-grid-2, .ms-grid-3, .ms-grid-4 { grid-template-columns: 1fr; }
}

/* ---- Forms on permanently-dark surfaces (hero, CTA band): hardcoded
   contrast, deliberately NOT theme-token-driven so they stay legible
   regardless of the visitor's light/dark mode ---- */
.ms-form-on-dark input,
.ms-form-on-dark textarea,
.ms-form-on-dark select {
	background: rgba(255,255,255,0.98) !important;
	color: #14171a !important;
	border: 1px solid rgba(255,255,255,0.3) !important;
	border-radius: 10px !important;
	padding: 14px 16px !important;
	font-size: 0.95rem !important;
}
.ms-form-on-dark input::placeholder,
.ms-form-on-dark textarea::placeholder { color: #6b7280 !important; opacity: 1 !important; }
.ms-form-on-dark label { color: rgba(255,255,255,0.85) !important; }
.ms-form-on-dark input:focus,
.ms-form-on-dark textarea:focus { border-color: var(--ms-accent) !important; box-shadow: 0 0 0 4px rgba(246,130,31,0.25) !important; }
.ms-form-on-dark button[type="submit"] { background: var(--ms-accent) !important; color: #17110a !important; }

/* ---- Client logo carousel: strip padding ---- */
.ms-clients-strip { padding: 64px 0 !important; }
@media (max-width: 600px) { .ms-logo-track img { height: 56px; width: 56px; } .ms-logo-track { gap: 16px; } }

/* ---- Standalone quote-form card: no hover lift, it's a form not a link ---- */
#get-a-quote .ms-card:hover { transform: none; box-shadow: none; }

/* ---- Legal links bar (below footer) ---- */
.ms-legal-bar { background: var(--ms-ink); border-top: 1px solid rgba(255,255,255,0.1); padding: 18px 0; }
.ms-legal-bar-inner { display: flex; gap: 28px; flex-wrap: wrap; justify-content: center; }
.ms-legal-bar-inner a { color: rgba(255,255,255,0.55); font-size: 0.8125rem; text-decoration: none; transition: color 0.25s var(--ms-ease); }
.ms-legal-bar-inner a:hover { color: var(--ms-accent); }
