/**
 * MicroLearn — "cloud" homepage skin.
 *
 * Phase 1 of the brand refresh: colour foundation only, no layout changes.
 *
 * The palette comes from the MicroLearn AI YouTube channel: ember orange
 * (var(--ms-green) / #fc6f02 ring, #f25d02 glow) on warm neutrals. Light mode is
 * cloud white with warm hairlines; dark mode is a warm charcoal/ember dark,
 * never navy or blue.
 *
 * Tokens only — ml-modern.css already drives every component from --ms-*, so
 * the markup does not change. Scoped to body.ml-cloud (front page for now).
 */

/* ---------------------------------------------------------------- Tokens */
body.ml-cloud {
	/* Accent: brand orange replaces the old green. */
	--ms-green: #f97316;
	--ms-green-hover: #ea6a0d;
	--ms-green-soft: #fff2e7;
	--ms-green-ink: #c2410c;

	/* Cloud neutrals (warm, never blue-grey). */
	--ms-ink: #291d16;
	--ms-ink-2: #3b2f27;
	--ms-body: #6b5b50;
	--ms-muted: #9a8879;
	--ms-line: #f0e4d8;
	--ms-line-soft: #f7f0e9;
	--ms-bg: #fbf6f1;
	--ms-bg-2: #fffdfa;
	--ms-white: #ffffff;
	--ms-amber: #d97706;

	--ms-radius-sm: 12px;
	--ms-radius: 18px;
	--ms-radius-lg: 26px;

	--ms-shadow-sm: 0 1px 2px rgba(66, 35, 12, .07);
	--ms-shadow: 0 18px 40px -24px rgba(66, 35, 12, .22);
	--ms-shadow-lg: 0 34px 70px -34px rgba(66, 35, 12, .3);

	--qa-orange: var(--ms-green);
	--qa-orange-hover: var(--ms-green-hover);
	--qa-orange-ink: var(--ms-accent-ink);
	--qa-ember: #7c2d12;
	--qa-ember-2: var(--ms-green-ink);
	--qa-surface: #ffffff;
	--qa-surface-2: #fdf8f3;
	--qa-border: #f0e4d8;
	--qa-header: rgba(255, 253, 250, .88);
	--qa-glow: rgba(249, 115, 22, .12);
	--qa-code: #191009;
	--qa-code-bar: #221710;
}

html[data-theme="dark"] body.ml-cloud {
	--ms-green: #ff8a3d;
	--ms-green-hover: #ffa15c;
	--ms-green-soft: #2b1a0c;
	--ms-green-ink: #ffb066;

	--ms-ink: #fdf1e6;
	--ms-ink-2: #ecd9c8;
	--ms-body: #c3ac9b;
	--ms-muted: #9c8474;
	--ms-line: #33251b;
	--ms-line-soft: #271c14;
	--ms-bg: #150f0b;
	--ms-bg-2: #120d0a;
	--ms-white: #291d16;
	--ms-amber: #f5b942;

	--ms-shadow-sm: 0 1px 2px rgba(0, 0, 0, .55);
	--ms-shadow: 0 18px 40px -24px rgba(0, 0, 0, .8);
	--ms-shadow-lg: 0 34px 70px -34px rgba(0, 0, 0, .9);

	--qa-orange: var(--ms-green);
	--qa-orange-hover: #ffa15c;
	--qa-orange-ink: var(--ms-accent-ink);
	--qa-surface: #291d16;
	--qa-surface-2: #221812;
	--qa-border: #33251b;
	--qa-header: rgba(18, 13, 10, .88);
	--qa-glow: rgba(255, 138, 61, .14);
	--qa-code: #0f0a07;
	--qa-code-bar: #170f0a;
}

/* ---------------------------------------------------------------- Page */
body.ml-cloud {
	background-color: var(--ms-bg);
	background-image:
		radial-gradient(1100px 520px at 88% -14%, rgba(249, 115, 22, .10), transparent 62%),
		radial-gradient(760px 420px at 4% 4%, rgba(249, 158, 11, .07), transparent 66%);
	background-repeat: no-repeat;
	color: var(--ms-ink);
}

html[data-theme="dark"] body.ml-cloud {
	background-image:
		radial-gradient(1100px 520px at 88% -14%, rgba(255, 138, 61, .13), transparent 62%),
		radial-gradient(760px 420px at 4% 4%, rgba(124, 45, 18, .22), transparent 68%);
}

/* ---------------------------------------------------------------- Header */
/* The header surface, radius and elevation belong to phase 2 (ml-chrome.css);
   this file only keeps its colours. */
body.ml-cloud .ms-header a,
body.ml-cloud .ms-menu > li > a,
body.ml-cloud .ms-nav a {
	color: var(--ms-ink-2);
}

body.ml-cloud .ms-menu > li > a:hover,
body.ml-cloud .ms-menu > li.current-menu-item > a {
	color: var(--qa-orange);
}

/* The form is only a wrapper; the rounded input carries the frame. */
body.ml-cloud .ms-search {
	background: transparent;
	border: 0;
}

body.ml-cloud .ms-search input[type="search"] {
	background: var(--qa-surface);
	border: 1px solid var(--qa-border);
}

body.ml-cloud .ms-icon-btn,
body.ml-cloud .ms-header .ml-theme-toggle {
	background: var(--qa-surface);
	border: 1px solid var(--qa-border);
	color: var(--ms-ink-2);
}

body.ml-cloud .ms-search input {
	color: var(--ms-ink);
}

body.ml-cloud .ms-search input::placeholder {
	color: var(--ms-muted);
}

body.ml-cloud .ms-icon-btn:hover,
body.ml-cloud .ms-header .ml-theme-toggle:hover {
	border-color: var(--qa-orange);
	color: var(--qa-orange);
}

/* Top strip: soft peach in light mode, ember in dark. */
body.ml-cloud .ms-topbar,
body.ml-cloud .ms-header__top,
body.ml-cloud .ms-announce {
	background: var(--ms-green-soft);
	border: 0;
	color: #a2480f;
}

html[data-theme="dark"] body.ml-cloud .ms-topbar,
html[data-theme="dark"] body.ml-cloud .ms-header__top,
html[data-theme="dark"] body.ml-cloud .ms-announce {
	background: #2b1a0c;
	color: #ffb066;
}

/* ---------------------------------------------------------------- Buttons */
body.ml-cloud .ms-btn,
body.ml-cloud .ms-nav-cta {
	background: var(--qa-orange);
	color: var(--qa-orange-ink) !important;
	border-radius: 12px;
	box-shadow: none;
	font-weight: 700;
}

body.ml-cloud .ms-btn:hover,
body.ml-cloud .ms-nav-cta:hover {
	background: var(--qa-orange-hover);
	color: var(--ms-accent-ink) !important;
	box-shadow: 0 12px 26px -14px rgba(249, 115, 22, .75);
}

body.ml-cloud .ms-btn--ghost {
	background: var(--qa-surface);
	border: 1px solid var(--qa-border);
	color: var(--ms-ink) !important;
}

body.ml-cloud .ms-btn--ghost:hover {
	border-color: var(--qa-orange);
	color: var(--qa-orange) !important;
}

body.ml-cloud .ms-btn--light {
	background: var(--qa-orange-ink);
	color: #fff !important;
}

body.ml-cloud .ms-btn--light:hover {
	background: #40200c;
	color: #fff !important;
}

/* ---------------------------------------------------------------- Sections */
body.ml-cloud .ms-sec--tint {
	background: var(--qa-surface-2);
	border-block: 1px solid var(--qa-border);
}

body.ml-cloud .ms-eyebrow {
	background: var(--ms-green-soft);
	color: var(--ms-green-ink);
	border: 1px solid rgba(249, 115, 22, .22);
}

body.ml-cloud .ms-eyebrow::before {
	background: var(--qa-orange);
}

body.ml-cloud .ms-sec__title,
body.ml-cloud .ms-hero__title,
body.ml-cloud .ms-cta h2 {
	color: var(--ms-ink);
}

body.ml-cloud .ms-hero__title em {
	color: var(--qa-orange);
	font-style: normal;
	box-shadow: inset 0 -.16em 0 rgba(249, 115, 22, .18);
}

body.ml-cloud .ms-sec__sub,
body.ml-cloud .ms-hero__lead {
	color: var(--ms-body);
}

body.ml-cloud .ms-more {
	color: var(--ms-green-ink);
}

/* ---------------------------------------------------------------- Hero */
body.ml-cloud .ms-hero {
	background:
		radial-gradient(900px 420px at 82% 0%, rgba(249, 115, 22, .13), transparent 62%),
		radial-gradient(620px 340px at 10% 96%, rgba(249, 158, 11, .10), transparent 68%),
		linear-gradient(180deg, #fffdfa, #fbf6f1);
	border-bottom: 1px solid var(--qa-border);
}

html[data-theme="dark"] body.ml-cloud .ms-hero {
	background:
		radial-gradient(900px 420px at 82% 0%, rgba(255, 138, 61, .16), transparent 62%),
		radial-gradient(620px 340px at 10% 96%, rgba(124, 45, 18, .28), transparent 68%),
		linear-gradient(180deg, #150f0b, #120d0a);
}

body.ml-cloud .ms-float,
body.ml-cloud .ms-stats__grid {
	background: var(--qa-surface);
	border: 1px solid var(--qa-border);
	box-shadow: var(--ms-shadow);
}

/* Stats: one bar, icon + number per item, thin dividers, no nested cards. */
body.ml-cloud .ms-stats {
	background: none;
	border: 0;
	box-shadow: none;
}

body.ml-cloud .ms-stats__grid {
	border-radius: 22px;
	padding: 20px 8px;
}

body.ml-cloud .ms-stat {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 14px;
	padding: 6px 18px;
	text-align: start;
	background: none;
	border: 0;
	border-inline-end: 1px solid var(--qa-border);
	box-shadow: none;
}

body.ml-cloud .ms-stat:last-child { border-inline-end: 0; }

body.ml-cloud .ms-stat > i {
	flex: none;
	width: 46px;
	height: 46px;
	border-radius: 14px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: color-mix(in srgb, var(--qa-orange) 12%, transparent);
	color: var(--qa-orange);
	font-size: 19px;
}

body.ml-cloud .ms-stat b {
	display: block;
	color: var(--ms-ink);
	font-size: clamp(19px, 2vw, 25px);
	line-height: 1.35;
}

body.ml-cloud .ms-stat span {
	display: block;
	margin: 0;
	color: var(--ms-muted);
	font-size: 12.5px;
}

@media (max-width: 900px) {
	body.ml-cloud .ms-stat { justify-content: flex-start; padding: 8px 14px; }
	body.ml-cloud .ms-stat:nth-child(2) { border-inline-end: 0; }
	body.ml-cloud .ms-stat:nth-child(n+3) { border-top: 1px solid var(--qa-border); padding-top: 14px; }
}

@media (max-width: 480px) {
	body.ml-cloud .ms-stat { gap: 10px; padding-inline: 10px; }
	body.ml-cloud .ms-stat > i { width: 38px; height: 38px; font-size: 16px; border-radius: 12px; }
}

/* Hero globe (assets/js/ml-globe.js). */
.ms-globe {
	position: relative;
	width: min(100%, 470px);
	aspect-ratio: 1;
	margin-inline: auto;
}

.ms-globe canvas {
	display: block;
	width: 100%;
	height: 100%;
}

@media (max-width: 767px) {
	.ms-globe { width: min(100%, 330px); }
}

body.ml-cloud .ms-code {
	background: var(--qa-code);
	border: 1px solid #2b1d13;
	box-shadow: var(--ms-shadow-lg);
}

body.ml-cloud .ms-code__bar {
	background: var(--qa-code-bar);
	border-bottom: 1px solid #2b1d13;
}

body.ml-cloud .ms-avatars span {
	background: var(--qa-surface);
	border: 2px solid var(--ms-bg-2);
	color: var(--ms-ink-2);
}

/* ---------------------------------------------------------------- Cards */
body.ml-cloud .ms-post,
body.ml-cloud .ms-video,
body.ml-cloud .ms-quote {
	background: var(--qa-surface);
	border: 1px solid var(--qa-border);
	border-radius: var(--ms-radius);
	box-shadow: var(--ms-shadow-sm);
	color: var(--ms-ink);
}

body.ml-cloud .ms-post:hover,
body.ml-cloud .ms-video:hover {
	border-color: rgba(249, 115, 22, .45);
	box-shadow: 0 20px 44px -26px rgba(66, 35, 12, .35);
	transform: translateY(-2px);
}

body.ml-cloud .ms-video__cat,
body.ml-cloud .ms-post__cat {
	background: var(--ms-green-soft);
	color: var(--ms-green-ink);
}

body.ml-cloud .ms-video__title,
body.ml-cloud .ms-post__title,
body.ml-cloud .ms-quote__name {
	color: var(--ms-ink);
}

body.ml-cloud .ms-post__meta,
body.ml-cloud .ms-video__desc,
body.ml-cloud .ms-quote__role {
	color: var(--ms-muted);
}

body.ml-cloud .ms-stars,
body.ml-cloud .ms-quote__stars {
	color: var(--ms-amber);
}

body.ml-cloud .ms-quote__ava {
	background: var(--ms-green-soft);
	color: var(--ms-green-ink);
}

body.ml-cloud .ms-play {
	background: rgba(249, 115, 22, .94);
	color: #fff;
}

body.ml-cloud .ms-video__dur {
	background: rgba(25, 16, 9, .8);
	color: #fff;
}

/* ---------------------------------------------------------------- Bands */
body.ml-cloud .ms-promo {
	background: linear-gradient(120deg, #7c2d12, var(--ms-green-ink) 58%, #9a3412);
	border: 1px solid var(--ms-green-hover);
	color: #fff3e8;
	box-shadow: 0 34px 70px -44px rgba(124, 45, 18, .8);
}

body.ml-cloud .ms-promo h3 {
	color: #fff;
}

body.ml-cloud .ms-promo p {
	color: rgba(255, 243, 232, .82);
}

body.ml-cloud .ms-promo__kicker {
	color: #ffd7b0;
}

body.ml-cloud .ms-cta {
	background:
		radial-gradient(700px 300px at 88% 10%, rgba(249, 115, 22, .16), transparent 66%),
		linear-gradient(120deg, #fff8f1, #ffeddd 60%, #fff5ec);
	border: 1px solid rgba(249, 115, 22, .28);
	color: var(--ms-ink);
}

html[data-theme="dark"] body.ml-cloud .ms-cta {
	background:
		radial-gradient(700px 300px at 88% 10%, rgba(255, 138, 61, .18), transparent 66%),
		linear-gradient(120deg, #221610, #2b1a0c 60%, #291d16);
	border: 1px solid rgba(255, 138, 61, .28);
}

body.ml-cloud .ms-cta p {
	color: var(--ms-body);
}

body.ml-cloud .ms-news {
	background: var(--qa-surface);
	border: 1px solid var(--qa-border);
}

body.ml-cloud .ms-news input {
	background: transparent;
	color: var(--ms-ink);
}

/* ---------------------------------------------------------------- Footer */
/* Kept dark in both modes: it grounds the cloud page and matches the
   channel's black base with ember highlights. */
body.ml-cloud .ms-footer,
html[data-theme="dark"] body.ml-cloud .ms-footer {
	background: #17100b;
	border-top: 1px solid #2b1d13;
	color: #cbb7a6;
}

body.ml-cloud .ms-footer h3,
body.ml-cloud .ms-footer h4,
body.ml-cloud .ms-footer a:hover {
	color: #fdf1e6;
}

/* The footer is dark in both modes, so the wordmark's first half is always light. */
body.ml-cloud .ms-footer .ms-logo__word-a,
body.ml-cloud .ms-footer .ms-logo__text small {
	color: #fdf1e6;
}

body.ml-cloud .ms-footer .ms-logo__text small { opacity: .7; }

body.ml-cloud .ms-footer p,
body.ml-cloud .ms-footer li,
body.ml-cloud .ms-footer__note {
	color: #cbb7a6;
}

body.ml-cloud .ms-footer a,
body.ml-cloud .ms-footer__links a {
	color: #cbb7a6;
}

body.ml-cloud .ms-footer__bottom {
	border-top: 1px solid #2b1d13;
	color: #9c8474;
}

body.ml-cloud .ms-socials a {
	background: #1f1610;
	border: 1px solid #2b1d13;
	color: #cbb7a6;
}

body.ml-cloud .ms-socials a:hover {
	border-color: var(--qa-orange);
	color: var(--qa-orange);
}

/* ---------------------------------------------------------------- Drawer */
body.ml-cloud .ms-drawer {
	background: var(--qa-surface);
	border-inline-start: 1px solid var(--qa-border);
}

body.ml-cloud .ms-drawer__menu a {
	color: var(--ms-ink-2);
	border-bottom: 1px solid var(--qa-border);
}

body.ml-cloud .ms-drawer__menu a:hover {
	color: var(--qa-orange);
}

/* Floats sit on the globe's edges, not across its face. */
body.ml-cloud .ms-hero__art .ms-float--a { top: 2%; inset-inline-end: 0; }
body.ml-cloud .ms-hero__art .ms-float--b { bottom: 4%; inset-inline-start: 4%; }
body.ml-cloud .ms-hero__art .ms-float--c { top: auto; bottom: 30%; inset-inline-start: auto; inset-inline-end: -12px; }

/* Homepage code-lab band: dark in both modes to sit with its image. */
.ms-lab {
	position: relative;
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
	align-items: center;
	overflow: hidden;
	min-height: 360px;
	border-radius: 28px;
	background: #0c0806;
	border: 1px solid #2b1d13;
	box-shadow: 0 40px 80px -50px rgba(124, 45, 18, .8);
	isolation: isolate;
}

.ms-lab__img {
	grid-column: 2;
	grid-row: 1;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: 70% 50%;
	-webkit-mask-image: linear-gradient(to right, #000 55%, transparent);
	mask-image: linear-gradient(to right, #000 55%, transparent);
}

.ms-lab__copy {
	grid-column: 1;
	grid-row: 1;
	position: relative;
	z-index: 1;
	padding: 40px 42px;
}

.ms-lab__kicker {
	display: inline-block;
	padding: 5px 12px;
	border-radius: 999px;
	background: rgba(249, 115, 22, .16);
	border: 1px solid rgba(249, 115, 22, .35);
	color: #fdba74;
	font-size: 12.5px;
	font-weight: 800;
}

.ms-lab__title {
	margin: 14px 0 0;
	color: #fff4ea;
	font-size: clamp(22px, 2.4vw, 30px);
	font-weight: 900;
	line-height: 1.6;
}

.ms-lab__text {
	margin: 12px 0 0;
	color: #cbb7a6;
	font-size: 14.5px;
	line-height: 2.05;
}

.ms-lab__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }

.ms-lab__btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 48px;
	padding: 0 22px;
	border-radius: 14px;
	background: #f97316;
	color: #fff !important;
	font-weight: 800;
	font-size: 14.5px;
	text-decoration: none !important;
	box-shadow: 0 14px 28px -14px #f97316;
	transition: transform .15s ease, background .15s ease;
}

.ms-lab__btn:hover { background: #ea580c; transform: translateY(-1px); }

.ms-lab__btn.is-ghost { background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .18); box-shadow: none; }

.ms-lab__btn.is-ghost:hover { background: rgba(255, 255, 255, .12); }

@media (max-width: 860px) {
	.ms-lab { grid-template-columns: 1fr; min-height: 0; }
	.ms-lab__img { grid-column: 1; grid-row: 1; height: auto; aspect-ratio: 16 / 9; -webkit-mask-image: linear-gradient(to top, transparent, #000 40%); mask-image: linear-gradient(to top, transparent, #000 40%); }
	.ms-lab__copy { grid-row: 2; padding: 0 22px 26px; margin-top: -30px; }
	.ms-lab__btn { flex: 1 1 140px; justify-content: center; }
}
.ms-lab__btn { white-space: nowrap; }
@media (max-width: 480px) { .ms-lab__btn { padding: 0 12px; font-size: 13.5px; gap: 6px; } }

/* Dark mode: keep the promo gradient deep enough for white text. */
html[data-theme="dark"] body.ml-cloud .ms-promo,
html[data-theme="dark"] .ms-promo {
	background: linear-gradient(120deg, #7c2d12, #c2410c 58%, #9a3412) !important;
}

/* Dark mode: the light CTA button would match the dark band; use the accent. */
html[data-theme="dark"] body.ml-cloud .ms-cta .ms-btn--light {
	background: var(--ms-green);
	color: #2b1105 !important;
	box-shadow: 0 12px 26px -14px var(--ms-green);
}
html[data-theme="dark"] body.ml-cloud .ms-cta .ms-btn--light:hover {
	background: #fdba74;
	color: #2b1105 !important;
}
