/* =========================================================================
 *  CLEUD homepage (front-page.php) — sections, interactions, responsive.
 *  Loaded with the deferred main stylesheet group on the front page only.
 * ========================================================================= */

/* ---- Shared section scaffold ---- */
.home .sec { padding: clamp(72px, 10vw, 128px) 5vw; }
.sec-paper { background: var(--cleud-paper); }
.sec-sand  { background: var(--cleud-sand); }
.sec-dark  { background: var(--cleud-ink); color: var(--cleud-paper); }
.wrap { max-width: var(--cleud-max-width); margin: 0 auto; }
.wrap.narrow { max-width: 860px; }
.center { text-align: center; }
.sec-head { margin-bottom: 60px; }

.split { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(40px, 6vw, 80px); align-items: center; }
.split-case { grid-template-columns: 0.92fr 1.08fr; }
.split-assess { grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; max-width: 1080px; }

/* ---- Typographic helpers ---- */
.lead-xl { margin: 0; font-size: clamp(22px, 2.4vw, 30px); font-weight: 500; line-height: 1.5; letter-spacing: -0.01em; color: var(--cleud-ink); }
.lead-accent { margin: 28px 0 0; font-family: var(--cleud-display); font-size: clamp(17px, 1.8vw, 21px); font-weight: 600; letter-spacing: 0.03em; color: #a08a5c; }
.h-lg { margin: 22px 0 26px; font-size: clamp(30px, 4.4vw, 48px); font-weight: 600; line-height: 1.1; }
.h-md { margin: 18px 0 24px; font-size: clamp(28px, 4vw, 46px); font-weight: 600; line-height: 1.1; }
.body-lg { margin: 0; font-size: 19px; line-height: 1.78; color: #46453d; }
.body-md { margin: 0 0 18px; font-size: 17px; line-height: 1.78; color: #46453d; }
.body-strong { margin: 0; font-size: 18px; line-height: 1.6; font-weight: 600; color: var(--cleud-ink); }
.eyebrow + .h-lg, .eyebrow + .h-md { margin-top: 18px; }
.lead-accent + .btn, .body-strong + .btn, .h-lg + .btn, .body-lg + .btn { margin-top: 28px; }
.stat-row + .btn { margin-top: 32px; }
.case-body p + .btn { margin-top: 24px; }

.media-frame img { width: 100%; height: auto; display: block; border-radius: 8px; }
.media-frame.ratio-4x5 { border-radius: 8px; overflow: hidden; border: 1px solid rgba(30,30,30,0.07); align-self: start; }
.media-frame.ratio-4x5 img { width: 100%; aspect-ratio: 10 / 9; height: auto; object-fit: cover; display: block; }
.split-focus { gap: 60px; }

/* ---- HERO ---- */
.home .hero { position: relative; height: 90vh; min-height: 640px; background: var(--cleud-dark); overflow: hidden; padding: 0; }
.hero-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; z-index: 0; }
.hero-scrim { position: absolute; inset: 0; z-index: 1; background: linear-gradient(to top, rgba(10,8,5,0.9) 0%, rgba(10,8,5,0.62) 28%, rgba(10,8,5,0.36) 58%, rgba(10,8,5,0.34) 100%); }
.hero-inner { position: absolute; inset: 0; z-index: 2; display: flex; align-items: flex-end; justify-content: center; }
.hero-copy { max-width: 1024px; margin: 0 auto; padding: 96px 5vw 68px; text-align: center; display: flex; flex-direction: column; align-items: center; }
.hero-eyebrow { color: #d9c9a4; margin-bottom: 22px; }
.hero-title { margin: 0; font-size: clamp(52px, 8vw, 112px); font-weight: 700; line-height: 0.98; letter-spacing: -0.03em; color: var(--cleud-paper); white-space: nowrap; }
@media (max-width: 560px) { .hero-title { white-space: normal; } }
.hero-lede { margin: 26px auto 0; max-width: 620px; font-size: clamp(18px, 1.6vw, 22px); font-weight: 500; line-height: 1.5; color: #efe7d8; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 36px; justify-content: center; }

/* ---- PROVE (parallax) ---- */
.prove { position: relative; overflow: hidden; padding: clamp(84px,11vw,140px) 5vw; }
.prove-bg { position: absolute; inset: 0; z-index: 0; overflow: hidden; }
.prove-bg img { position: absolute; left: 0; top: -32%; width: 100%; height: 164%; object-fit: cover; display: block; will-change: transform; }
.prove-scrim { position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, rgba(18,16,12,0.9) 0%, rgba(18,16,12,0.85) 50%, rgba(18,16,12,0.9) 100%); }
.prove-inner { position: relative; z-index: 2; }
.prove-q { margin: 0 0 40px; font-size: clamp(28px,4vw,52px); font-weight: 600; line-height: 1.22; letter-spacing: -0.02em; color: var(--cleud-paper); }
.prove-q span { color: var(--cleud-accent); }

/* ---- PROCESS cards ---- */
.ic-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.ic-card { position: relative; background: var(--cleud-card); border: 1px solid rgba(30,30,30,0.07); border-radius: 10px; padding: 44px 34px 40px; transition: transform .35s ease, box-shadow .35s ease; }
.ic-card:hover { transform: translateY(-6px); box-shadow: 0 22px 44px -26px rgba(30,30,30,0.4); }
.ic-badge { position: relative; width: 92px; height: 92px; margin-bottom: 26px; display: flex; align-items: center; justify-content: center; }
.ic-pulse { position: absolute; inset: 0; border-radius: 50%; background: var(--cleud-accent); animation: ic-pulse 2.8s ease-out infinite; }
.ic-card:nth-child(2) .ic-pulse { animation-delay: .5s; }
.ic-card:nth-child(3) .ic-pulse { animation-delay: 1s; }
.ic-disc { position: relative; width: 92px; height: 92px; border-radius: 50%; background: #efe6d4; border: 1px solid rgba(176,143,94,0.35); display: flex; align-items: center; justify-content: center; }
.ic-step { font-size: 13px; font-weight: 700; letter-spacing: 0.16em; color: var(--cleud-gold); margin-bottom: 10px; }
.ic-card h3 { margin: 0 0 14px; font-size: 23px; font-weight: 600; letter-spacing: -0.01em; }
.ic-card p { margin: 0; font-size: 15.5px; line-height: 1.7; color: #54524a; }
@keyframes ic-pulse { 0%,100% { transform: scale(1); opacity: .5; } 50% { transform: scale(1.18); opacity: 0; } }

/* Animated process icons (verbatim from the design) */
.cl2-ic { overflow: visible; animation: cl2-float 4.5s ease-in-out infinite; }
.cl2-doc { animation-delay: .4s; }
.cl2-shield { animation-delay: .8s; }
.cl2-search .cl2-radar { transform-box: view-box; transform-origin: 21px 21px; animation: cl2-spin 2.4s linear infinite; }
.cl2-search .cl2-beamtrail { opacity: .4; }
.cl2-search .cl2-ping { transform-box: view-box; transform-origin: 21px 21px; animation: cl2-ping 3s ease-out infinite; }
.cl2-search .cl2-ping2 { transform-box: view-box; transform-origin: 21px 21px; animation: cl2-ping 3s ease-out infinite 1.5s; }
.cl2-doc .cl2-paper { transform-box: view-box; transform-origin: 24px 41px; animation: cl2-rock 5s ease-in-out infinite; }
.cl2-doc .cl2-line { stroke-dasharray: 18; }
.cl2-doc .cl2-d1 { animation: cl2-type 4s ease-in-out infinite; }
.cl2-doc .cl2-d2 { animation: cl2-type 4s ease-in-out infinite .3s; }
.cl2-doc .cl2-d3 { animation: cl2-type 4s ease-in-out infinite .6s; }
.cl2-doc .cl2-stamp { transform-box: view-box; transform-origin: 24px 30px; opacity: 0; animation: cl2-stamp 4s ease-out infinite; }
.cl2-shield .cl2-ring { transform-box: view-box; transform-origin: 24px 24px; animation: cl2-spin 8s linear infinite; }
.cl2-shield .cl2-guard { transform-box: view-box; transform-origin: 24px 24px; animation: cl2-guard 3.4s ease-in-out infinite; }
.cl2-shield .cl2-check { transform-box: view-box; transform-origin: 24px 24px; stroke-dasharray: 30; animation: cl2-checkb 3.4s ease-in-out infinite; }
.cl2-shield .cl2-spark { fill: #b08f5e; stroke: none; }
.cl2-shield .cl2-s1 { transform-box: view-box; transform-origin: 38px 11px; animation: cl2-twinkle 2.6s ease-in-out infinite; }
.cl2-shield .cl2-s2 { transform-box: view-box; transform-origin: 10px 16px; animation: cl2-twinkle 2.6s ease-in-out infinite 1.1s; }
@keyframes cl2-float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
@keyframes cl2-spin { to { transform: rotate(360deg); } }
@keyframes cl2-ping { 0% { transform: scale(.5); opacity: 0; } 18% { opacity: .5; } 100% { transform: scale(1.85); opacity: 0; } }
@keyframes cl2-rock { 0%,100% { transform: rotate(-3.5deg); } 50% { transform: rotate(3.5deg); } }
@keyframes cl2-type { 0% { stroke-dashoffset: 18; } 28% { stroke-dashoffset: 0; } 62% { stroke-dashoffset: 0; } 80%,100% { stroke-dashoffset: -18; } }
@keyframes cl2-stamp { 0%,52% { opacity: 0; transform: scale(0) rotate(-12deg); } 62% { opacity: 1; transform: scale(1.3) rotate(0deg); } 70% { transform: scale(.9); } 78% { transform: scale(1.06); } 86% { transform: scale(1); } 96% { opacity: 1; } 100% { opacity: 0; transform: scale(1); } }
@keyframes cl2-guard { 0%,100% { transform: scale(1); } 10% { transform: scale(.93); } 20% { transform: scale(1.07); } 32% { transform: scale(1); } }
@keyframes cl2-checkb { 0% { stroke-dashoffset: 30; transform: scale(1); } 22% { stroke-dashoffset: 0; } 32% { transform: scale(1.18); } 44% { transform: scale(1); } 82% { stroke-dashoffset: 0; transform: scale(1); } 100% { stroke-dashoffset: 30; } }
@keyframes cl2-twinkle { 0%,100% { transform: scale(0); opacity: 0; } 50% { transform: scale(1); opacity: 1; } }

/* ---- WHY slider ---- */
.why { padding-left: 0; padding-right: 0; }
.why .wrap { padding: 0 5vw; }
.why-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 18px; }
.why-nav { display: flex; align-items: center; gap: 20px; flex-shrink: 0; }
.why-count { font-family: var(--cleud-display); font-size: 13px; font-weight: 600; letter-spacing: 0.12em; color: #8a7c5e; }
.why-count #whyCount { color: var(--cleud-ink); font-size: 16px; }
.why-arrow { width: 50px; height: 50px; border-radius: 50%; border: 1px solid rgba(30,30,30,0.25); background: transparent; color: var(--cleud-ink); cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all .22s; }
.why-arrow:hover { background: var(--cleud-ink); color: var(--cleud-paper); border-color: var(--cleud-ink); }
.why-progress { height: 3px; background: rgba(30,30,30,0.12); border-radius: 3px; overflow: hidden; }
.why-progress #whyFill { height: 100%; width: 16.6%; background: var(--cleud-gold); border-radius: 3px; transition: width .35s cubic-bezier(.22,.61,.36,1); }
.why-track { overflow-x: auto; scroll-snap-type: x proximity; padding: 30px 5vw 26px; padding-left: max(5vw, calc((100vw - 1180px) / 2 + 5vw)); scroll-padding-left: max(5vw, calc((100vw - 1180px) / 2 + 5vw)); scrollbar-width: none; cursor: grab; }
.why-track::-webkit-scrollbar { display: none; }
.why-track.dragging { cursor: grabbing; scroll-behavior: auto; }
.why-track.dragging * { user-select: none; }
.why-row { display: flex; gap: 24px; width: max-content; }
/* Trailing spacer lets the LAST card scroll to the start position (so the slider
   advances all the way to 06/06), matching the design. */
.why-spacer { flex: 0 0 max(5vw, calc(100vw - clamp(278px, 78vw, 338px) - max(5vw, calc((100vw - 1180px) / 2 + 5vw)) - 5vw)); }
.why-item { flex: 0 0 clamp(278px, 78vw, 338px); scroll-snap-align: start; display: flex; flex-direction: column; align-items: flex-start; }
.why-node { width: 56px; height: 56px; border-radius: 50%; background: var(--cleud-paper); border: 1.5px solid rgba(176,143,94,0.5); color: var(--cleud-gold); display: flex; align-items: center; justify-content: center; font-size: 17px; font-weight: 700; transition: all .35s ease; }
.why-stem { width: 2px; height: 22px; margin-left: 27px; background: rgba(30,30,30,0.16); transition: background .35s ease; }
.why-card { width: 100%; background: var(--cleud-paper); border: 1px solid var(--cleud-line); border-radius: 14px; padding: 30px 28px 32px; flex: 1; text-align: left; transition: transform .35s ease, box-shadow .35s ease, border-color .35s ease; }
.why-card h3 { margin: 0 0 12px; font-size: 20px; font-weight: 600; line-height: 1.25; }
.why-card p { margin: 0; font-size: 15px; line-height: 1.68; color: #54524a; }
.why-item.on .why-node { border-color: var(--cleud-gold); transform: scale(1.06); }
.why-item.on .why-stem { background: var(--cleud-gold); }
.why-item.on .why-card { border-color: rgba(176,143,94,0.55); box-shadow: 0 24px 48px -30px rgba(30,30,30,0.5); }

/* ---- CASE ---- */
.stat-row { display: flex; gap: clamp(28px,3vw,44px); padding: 28px 0 0; margin-top: 32px; border-top: 1px solid rgba(30,30,30,0.12); }
.stat-n { font-size: clamp(34px,3.4vw,42px); font-weight: 700; letter-spacing: -0.02em; line-height: 1; }
.stat-n span, .stat-n.stat-accent { color: var(--cleud-accent); }
.stat-l { margin-top: 8px; font-size: 13px; color: #6f6655; line-height: 1.4; }
.case-card { border-radius: 12px; overflow: hidden; border: 1px solid rgba(30,30,30,0.08); box-shadow: 0 30px 60px -40px rgba(30,30,30,0.45); background: var(--cleud-card); }
.case-media { position: relative; aspect-ratio: 16/9; background: #cbb993; overflow: hidden; }
.case-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.case-tag { position: absolute; left: 22px; top: 22px; display: inline-flex; align-items: center; gap: 8px; background: rgba(30,30,30,0.82); color: #e6d6b3; font-size: 11px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; padding: 7px 13px; border-radius: 999px; }
.case-body { padding: clamp(30px,3vw,42px); }
.case-body p { margin: 0 0 24px; font-size: 17px; line-height: 1.74; color: #3c3b34; }

/* ---- ASSESS form ---- */
.chip-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.chip { display: inline-flex; align-items: center; gap: 8px; background: rgba(184,168,139,0.22); color: #5e5232; font-size: 13.5px; font-weight: 600; padding: 9px 16px; border-radius: 999px; }
.chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--cleud-accent); }
.assess-form { background: var(--cleud-card); border: 1px solid rgba(30,30,30,0.08); border-radius: 14px; padding: 34px; box-shadow: 0 30px 60px -44px rgba(30,30,30,0.5); }
.assess-form .ff-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.assess-form label { display: block; margin-bottom: 16px; }
.assess-form label span { display: block; font-size: 12.5px; font-weight: 600; letter-spacing: 0.03em; color: #6f6655; margin-bottom: 7px; }
.assess-form .ff-grid label { margin-bottom: 0; }
.assess-form input, .assess-form textarea { width: 100%; padding: 13px 15px; border: 1px solid rgba(30,30,30,0.18); border-radius: 8px; background: #fdfcf8; font: inherit; font-size: 15px; color: var(--cleud-ink); outline: none; transition: border-color .2s; }
.assess-form input:focus, .assess-form textarea:focus { border-color: var(--cleud-accent); }
.assess-form textarea { resize: vertical; min-height: 84px; }
.ff-submit { width: 100%; justify-content: center; margin-top: 6px; }
.ff-note { margin: 16px 0 0; font-size: 12px; line-height: 1.5; color: #8a8270; text-align: center; }

/* Footer strapline band moved to critical.css (global footer chrome). */

/* fx-btn (sheen + lift) is defined globally in critical.css. */

/* ---- Reveal on scroll ----
 * Initial hidden state is set in critical.css (`html.js .reveal`) to avoid FOUC;
 * direction/duration/transition are applied inline by home.js (matches design).
 */

/* ---- Responsive ---- */
@media (max-width: 900px) {
	.split, .split-case, .split-assess { grid-template-columns: 1fr; gap: 40px; }
	.split-intro .media-frame, .split-focus .media-frame { order: -1; }
	.ic-grid { grid-template-columns: 1fr; }
	.why-head { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 540px) {
	.hero-actions { flex-direction: column; align-items: stretch; }
	.stat-row { flex-wrap: wrap; gap: 22px; }
	.assess-form .ff-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
	.reveal { opacity: 1; transform: none; transition: none; }
	.ic-pulse, .fx-btn::before { animation: none !important; }
	.cl2-ic, .cl2-ic * { animation: none !important; }
	.cl2-doc .cl2-line, .cl2-shield .cl2-check { stroke-dashoffset: 0 !important; }
	.cl2-doc .cl2-stamp { opacity: 1 !important; }
	.cl2-search .cl2-ping, .cl2-search .cl2-ping2, .cl2-search .cl2-radar, .cl2-shield .cl2-ring, .cl2-shield .cl2-spark { display: none !important; }
}
