/* =========================================================
   Calcimag – homepage design layer (used with Elementor)
   Classes are set in Elementor → Advanced → CSS Classes.
   ========================================================= */

/* ---------- Shared ---------- */
.cmg-display .elementor-heading-title { letter-spacing: -0.02em; }
.cmg-hl { color: var(--cmg-teal); }
.cmg-light .elementor-heading-title, .cmg-light { color: #fff; }

/* Word-by-word headline reveal */
.cmg-motion .cmg-words .cmg-w { display: inline-block; opacity: 0; transform: translateY(0.45em); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.2,1); transition-delay: calc(var(--i) * 55ms); }
.cmg-motion .cmg-words.is-inview .cmg-w { opacity: 1; transform: none; }

/* ---------- 1. Hero ---------- */
.cmg-hero { position: relative; overflow: hidden; min-height: calc(100vh - var(--cmg-header-h, 124px)) !important; }
@media (max-width: 1024px) { .cmg-hero { min-height: 0 !important; } }
.cmg-hero .elementor-background-slideshow__slide__image { filter: saturate(1.05); }
.cmg-hero h1.elementor-heading-title { text-shadow: 0 2px 30px rgba(8, 24, 40, .35); }
.cmg-hero .cmg-hl { color: #7FD0D7; }
.cmg-hero-stats {
	background: rgba(15, 42, 68, .55);
	-webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
	border-top: 1px solid rgba(255, 255, 255, .18);
}
.cmg-hero-stats .elementor-widget-counter + .elementor-widget-counter { border-left: 1px solid rgba(255,255,255,.18); }
@media (max-width: 767px) { .cmg-hero-stats .elementor-widget-counter:nth-child(3) { border-left: 0; } }
.cmg-scroll-cue { display: inline-flex; flex-direction: column; align-items: center; gap: 10px; color: rgba(255,255,255,.8); font: 600 11px/1 Montserrat, sans-serif; letter-spacing: .2em; text-transform: uppercase; }
.cmg-scroll-cue i { display: block; width: 1px; height: 46px; background: rgba(255,255,255,.35); position: relative; overflow: hidden; }
.cmg-scroll-cue i::after { content: ""; position: absolute; left: 0; top: -40%; width: 1px; height: 40%; background: #fff; animation: cmgCue 2s ease-in-out infinite; }
@keyframes cmgCue { to { top: 100%; } }
@media (max-width: 1024px) { .cmg-scroll-cue { display: none; } }

/* ---------- 2. Intro statement ---------- */
.cmg-statement .elementor-heading-title { font-weight: 600 !important; }
.cmg-statement .cmg-hl { color: var(--cmg-navy); background: linear-gradient(transparent 62%, rgba(60,169,179,.28) 62%); }
.cmg-founded { position: relative; }
.cmg-founded .elementor-widget-image img { box-shadow: 0 30px 60px -20px rgba(15, 42, 68, .35); }
.cmg-badge { background: var(--cmg-navy); color: #fff; border-radius: 8px; padding: 18px 22px; box-shadow: 0 18px 40px -12px rgba(15,42,68,.45); }

/* ---------- 3. Product panels ---------- */
.elementor .e-con.cmg-panel { position: relative; overflow: hidden !important; isolation: isolate; border-radius: 10px; --overflow: hidden; }
.cmg-panel > .elementor-widget-image.cmg-panel-bg { position: absolute !important; inset: 0; z-index: -2; margin: 0 !important; width: 100% !important; max-width: none !important; height: 100%; overflow: hidden; }
.cmg-panel > .elementor-widget-image.cmg-panel-bg .elementor-widget-container { height: 100%; }
.cmg-panel > .elementor-widget-image.cmg-panel-bg img { width: 100% !important; height: 100% !important; object-fit: cover; transition: transform 1.2s cubic-bezier(.2,.7,.2,1); }
.elementor .e-con.cmg-panel::before { content: "" !important; display: block !important; opacity: 1 !important; position: absolute; inset: 0; z-index: -1; mix-blend-mode: normal; background: linear-gradient(180deg, rgba(15,42,68,.10) 0%, rgba(15,42,68,.62) 45%, rgba(10,30,50,.96) 100%); transition: background .5s ease; }
.cmg-panel:hover > .cmg-panel-bg img { transform: scale(1.07); }
.elementor .e-con.cmg-panel:hover::before { background: linear-gradient(180deg, rgba(15,42,68,.2) 0%, rgba(15,42,68,.7) 45%, rgba(10,30,50,.96) 100%); }
.cmg-panel-num .elementor-heading-title { -webkit-text-stroke: 1.5px rgba(255,255,255,.7); color: transparent !important; }
.cmg-panel-more { display: grid !important; grid-template-rows: 0fr; opacity: 0; transition: grid-template-rows .55s cubic-bezier(.2,.7,.2,1), opacity .45s ease; }
.cmg-panel-more > .e-con, .cmg-panel-more > .e-con-inner > .e-con { min-height: 0; overflow: hidden; }
.cmg-panel:hover .cmg-panel-more, .cmg-panel:focus-within .cmg-panel-more { grid-template-rows: 1fr; opacity: 1; }
@media (hover: none), (max-width: 1024px) { .cmg-panel-more { grid-template-rows: 1fr; opacity: 1; } }
.cmg-panel .cmg-chip { background: rgba(255,255,255,.14); color: #fff; border: 1px solid rgba(255,255,255,.25); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.cmg-panel-line { width: 56px; height: 3px; background: var(--cmg-teal); transition: width .5s ease; }
.cmg-panel:hover .cmg-panel-line { width: 120px; }

/* ---------- 4. Plant-to-port story ---------- */
.cmg-story { position: relative; overflow-x: clip; }
.cmg-story-pin { overflow: hidden !important; max-width: 100vw; }
.cmg-story.is-pinned .cmg-story-pin { position: sticky; top: var(--cmg-header-h, 0px); min-height: calc(100vh - var(--cmg-header-h, 0px)); justify-content: center; }
.cmg-story-track { flex-wrap: nowrap !important; will-change: transform; }
.cmg-story-card { flex: 0 0 auto !important; width: 400px !important; }
.cmg-story-card .elementor-widget-image img { height: 300px !important; object-fit: cover; width: 100% !important; transition: transform .8s ease; }
.cmg-story-card .elementor-widget-image { overflow: hidden; border-radius: 8px; }
.cmg-story-card:hover .elementor-widget-image img { transform: scale(1.05); }
.cmg-story-step .elementor-heading-title { font-variant-numeric: tabular-nums; }
.cmg-story-bar { height: 3px; background: rgba(255,255,255,.12); border-radius: 3px; overflow: hidden; max-width: 1240px; margin: 0 auto; }
.cmg-story-bar span { display: block; height: 100%; background: var(--cmg-teal); transform-origin: left; transform: scaleX(0); }
@media (max-width: 1024px) {
	.cmg-story-track { overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; padding-bottom: 14px !important; scrollbar-width: thin; }
	.cmg-story-card { width: 78vw !important; max-width: 380px; scroll-snap-align: start; }
	.cmg-story-card .elementor-widget-image img { height: 230px !important; }
	.cmg-story-bar { display: none; }
}

/* ---------- 5. Sustainability ---------- */
.cmg-eco { position: relative; }
.cmg-eco-stat { background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.22); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-radius: 10px; transition: transform .4s ease, background .4s ease; }
.cmg-eco-stat:hover { transform: translateY(-6px); background: rgba(255,255,255,.16); }

/* ---------- 6. Global reach ---------- */
.cmg-global .cmg-map svg { overflow: hidden; }
.cmg-global-note { color: rgba(255,255,255,.6); }

.cmg-story-track { padding-left: max(20px, calc((100vw - 1240px) / 2 + 20px)) !important; padding-right: max(20px, calc((100vw - 1240px) / 2 + 20px)) !important; }

/* Light variant of the routes map */
.cmg-global-light .cmg-routes .land circle { fill: #BFDDE2; }
.cmg-global-light .cmg-routes text { fill: var(--cmg-navy); stroke: #fff; stroke-width: 4px; paint-order: stroke; }
.cmg-global-light .cmg-routes .origin .dot { fill: var(--cmg-navy); }
.cmg-global-light .cmg-routes .origin .pulse { stroke: var(--cmg-navy); }
.cmg-global-light .cmg-routes .arc { stroke: var(--cmg-teal); stroke-width: 1.8; }
.cmg-global-light .cmg-routes text { stroke-width: 3px; }
.cmg-global-light .cmg-global-note { color: #6b7b88; }

/* Counters aligned left inside text columns */
.cmg-global .elementor-counter { align-items: flex-start !important; text-align: left; }
.cmg-global .elementor-counter-number-wrapper { justify-content: flex-start !important; }
.cmg-global .elementor-counter-title { text-align: left !important; justify-content: flex-start !important; }

/* ---------- 7. Client marquee ---------- */
.cmg-marquee { overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.cmg-marquee ul { display: flex; gap: 18px; width: max-content; margin: 0; padding: 6px 0; list-style: none; animation: cmgMarquee 38s linear infinite; }
.cmg-marquee.rev ul { animation-direction: reverse; animation-duration: 44s; }
.cmg-marquee:hover ul { animation-play-state: paused; }
.cmg-marquee li { flex: none; padding: 18px 30px; border: 1px solid var(--cmg-border); border-radius: 60px; background: #fff; font: 600 17px/1 Montserrat, sans-serif; color: var(--cmg-navy); white-space: nowrap; }
.cmg-marquee li span { color: var(--cmg-teal); font-weight: 500; font-size: 13px; margin-left: 10px; font-family: Inter, sans-serif; }
@keyframes cmgMarquee { to { transform: translateX(-50%); } }
.cmg-reduced .cmg-marquee ul { animation: none; flex-wrap: wrap; width: auto; }

/* ---------- 8. MD quote ---------- */
.cmg-quote { position: relative; }
.cmg-quote::before { content: "\201C"; position: absolute; top: -40px; left: -10px; font: 700 220px/1 Georgia, serif; color: rgba(60,169,179,.14); pointer-events: none; }
.cmg-quote-ta .elementor-heading-title { font-family: "Noto Sans Tamil", "Latha", "Nirmala UI", sans-serif !important; }
.cmg-sign > .e-con, .cmg-sign > .e-con-inner > .e-con { width: auto !important; flex: 0 1 auto !important; }
.cmg-sign { flex-wrap: nowrap !important; }
@media (max-width: 767px) { .cmg-sign { flex-wrap: wrap !important; } }
.cmg-avatar img { border-radius: 50% !important; width: 76px !important; height: 76px !important; object-fit: cover; object-position: top; border: 3px solid var(--cmg-teal); }

/* Reduced motion: switch off decorative movement */
@media (prefers-reduced-motion: reduce) {
	.cmg-panel > .cmg-panel-bg img, .cmg-story-card img, .cmg-eco-stat { transition: none !important; }
	.cmg-scroll-cue i::after { animation: none; }
}

/* =========================================================
   HERO v3 – split layout (navy message + product columns)
   ========================================================= */
.cmg-hero-split { min-height: 0 !important; }
.cmg-hero-split .cmg-hero-left { position: relative; overflow: hidden; isolation: isolate; }
.cmg-hero-split .cmg-hero-left::after { content: ""; position: absolute; z-index: -1; width: 760px; height: 760px; right: -420px; bottom: -330px; border-radius: 50%; border: 96px solid rgba(60, 169, 179, .07); pointer-events: none; }
.cmg-hero-split .cmg-hero-left::before { content: ""; position: absolute; z-index: -1; inset: 0; background: radial-gradient(900px 500px at 0% 100%, rgba(60,169,179,.16), transparent 60%); pointer-events: none; }
.cmg-hero-kpis { border-top: 1px solid rgba(255,255,255,.14); padding-top: 24px !important; margin-top: 18px !important; }
.cmg-hero-kpis .elementor-counter { align-items: flex-start !important; }
.cmg-hero-kpis .elementor-counter-number-wrapper { justify-content: flex-start !important; }
.cmg-hero-kpis .elementor-counter-title { text-align: left !important; }

.cmg-cols { position: relative; }
.cmg-col { position: relative; overflow: hidden !important; isolation: isolate; flex: 1 1 0% !important; min-width: 0; transition: flex-grow .7s cubic-bezier(.2,.7,.2,1); --overflow: hidden; }
.cmg-col > .elementor-widget-image.cmg-panel-bg { position: absolute !important; inset: 0; z-index: -2; margin: 0 !important; width: 100% !important; max-width: none !important; height: 100%; overflow: hidden; }
.cmg-col > .elementor-widget-image.cmg-panel-bg .elementor-widget-container { height: 100%; }
.cmg-col > .elementor-widget-image.cmg-panel-bg img { width: 100% !important; height: 100% !important; object-fit: cover; transition: transform 1.4s cubic-bezier(.2,.7,.2,1); }
.elementor .e-con.cmg-col::before { content: "" !important; display: block !important; opacity: 1 !important; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(10,30,50,.0) 38%, rgba(10,30,50,.82) 100%); transition: background .6s ease; }
.elementor .e-con.cmg-col:hover::before { background: linear-gradient(180deg, rgba(10,30,50,.15) 20%, rgba(10,30,50,.9) 100%); }
.cmg-col:hover > .cmg-panel-bg img { transform: scale(1.05); }
.cmg-col .cmg-chip { background: rgba(255,255,255,.16); color: #fff; border: 1px solid rgba(255,255,255,.3); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.cmg-col .elementor-heading-title { text-shadow: 0 2px 18px rgba(0,0,0,.25); }
.cmg-col-link .elementor-button { padding-left: 0 !important; }
.cmg-col-link .elementor-button-icon { transition: transform .3s ease; }
.cmg-col:hover .cmg-col-link .elementor-button-icon { transform: translateX(5px); }
/* make the whole column clickable (link stretched over the column) */
.cmg-col .cmg-col-link .elementor-button::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.cmg-col .cmg-col-link, .cmg-col .cmg-col-link .elementor-widget-container, .cmg-col .cmg-col-link .elementor-button-wrapper { position: static !important; }

/* Ken Burns on load for the product photos */
.cmg-motion .cmg-kb img { animation: cmgKb 9s ease-out both; }
@keyframes cmgKb { from { transform: scale(1.14); } to { transform: scale(1); } }
.cmg-motion .cmg-col:hover > .cmg-kb img { animation: none; }

/* Rotating seal on the seam */
.cmg-seal { position: relative; width: 150px; height: 150px; color: #fff; }
.cmg-seal svg { position: absolute; inset: 0; width: 100%; height: 100%; animation: cmgSpin 22s linear infinite; }
.cmg-seal text { font: 700 11.5px Montserrat, sans-serif; letter-spacing: .18em; fill: #fff; }
.cmg-seal span { position: absolute; inset: 22px; border-radius: 50%; background: var(--cmg-teal); display: flex; flex-direction: column; align-items: center; justify-content: center; font: 600 10px/1.2 Montserrat, sans-serif; letter-spacing: .14em; text-transform: uppercase; box-shadow: 0 18px 40px rgba(0,0,0,.35); }
.cmg-seal b { font: 700 30px/1 Montserrat, sans-serif; letter-spacing: 0; }
.cmg-seal::before { content: ""; position: absolute; inset: 0; border-radius: 50%; background: rgba(15,42,68,.55); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
@keyframes cmgSpin { to { transform: rotate(360deg); } }
.cmg-cols > .elementor-widget-html { position: absolute !important; left: 0; top: 50%; transform: translate(-50%, -50%); z-index: 5; width: auto !important; margin: 0 !important; }

@media (min-width: 1025px) {
	.cmg-hero-split { min-height: 100vh !important; }
	.cmg-hero-split > .cmg-hero-left { flex: 0 0 46% !important; width: 46% !important; padding-left: max(20px, calc((100vw - 1240px) / 2 + 20px)) !important; }
	.cmg-hero-split > .cmg-cols { flex: 1 1 54% !important; width: 54% !important; }
	.cmg-cols:hover .cmg-col { flex-grow: .85 !important; }
	.cmg-cols .cmg-col:hover { flex-grow: 1.35 !important; }
	.cmg-col .elementor-widget-html .cmg-chip { white-space: nowrap; }
}
@media (max-width: 1024px) {
	.cmg-hero-split > .cmg-hero-left, .cmg-hero-split > .cmg-cols { width: 100% !important; }
	.cmg-cols { flex-direction: row !important; }
	.cmg-cols > .elementor-widget-html { left: 50%; top: 0; }
	.cmg-seal { width: 118px; height: 118px; }
	.cmg-seal b { font-size: 24px; }
}
@media (max-width: 767px) {
	.cmg-cols { flex-direction: column !important; }
	.cmg-cols > .elementor-widget-html { left: auto; right: 18px; top: 0; transform: translateY(-50%); }
	.cmg-hero-kpis .elementor-counter-title { font-size: 12px !important; }
	.cmg-seal { width: 104px; height: 104px; }
	.cmg-seal text { font-size: 13px; }
}

/* =========================================================
   Transparent header over the hero (homepage, desktop)
   ========================================================= */
@media (min-width: 1025px) {
	body.home #masthead { position: fixed; left: 0; right: 0; top: 0; transition: background-color .35s ease, box-shadow .35s ease; }
	body.home #masthead:not(.cmg-scrolled) { background: transparent !important; box-shadow: none !important; }
	body.home.admin-bar #masthead { top: 32px; }
	body.home #masthead:not(.cmg-scrolled) .ast-primary-header-bar,
	body.home #masthead:not(.cmg-scrolled) .main-header-bar { background: transparent !important; border-bottom-color: transparent !important; box-shadow: none !important; }
	body.home #masthead .ast-primary-header-bar { transition: background-color .35s ease; }
	body.home #masthead:not(.cmg-scrolled) .custom-logo { filter: brightness(0) invert(1); }
	body.home #masthead:not(.cmg-scrolled) .main-header-menu {
		background: rgba(10, 30, 50, .5); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
		border: 1px solid rgba(255,255,255,.18); border-radius: 40px; padding: 0 12px;
	}
	body.home #masthead:not(.cmg-scrolled) .main-header-menu .menu-link { color: #fff !important; line-height: 50px !important; }
	body.home #masthead:not(.cmg-scrolled) .main-header-menu .current-menu-item > .menu-link { color: #9FDDE2 !important; }
	body.home #masthead.cmg-scrolled .ast-primary-header-bar { background: #fff !important; }
}
@media (prefers-reduced-motion: reduce) {
	.cmg-seal svg, .cmg-kb img { animation: none !important; }
	.cmg-col { transition: none; }
}
@media (max-width: 767px) {
	.cmg-cols > .elementor-widget-html { display: none !important; }
	.elementor .e-con.cmg-col::before { background: linear-gradient(180deg, rgba(10,30,50,.3) 0%, rgba(10,30,50,.88) 100%) !important; }
}

/* ---------- Mobile: plant-to-port story stacks vertically (1.4) ---------- */
@media (max-width: 767px) {
	.cmg-story-track { flex-direction: column !important; overflow: visible !important; scroll-snap-type: none; gap: 28px !important; padding-bottom: 0 !important; transform: none !important; }
	.cmg-story-card { width: 100% !important; max-width: none; }
	.cmg-story-card .elementor-widget-image img { height: 210px !important; }
	.cmg-kural--feature .cmg-kural__ta { font-size: clamp(16px, 4.6vw, 22px); }
}

/* ---------- 7b. Marquee chips reveal client logos (1.5.3) ---------- */
.cmg-marquee li.cmg-mq { position: relative; overflow: hidden; cursor: default; transition: border-color .3s ease, box-shadow .3s ease, transform .3s ease; --x: 50%; }
.cmg-mq-face { display: inline-block; transition: transform .45s cubic-bezier(.2,.8,.2,1), opacity .3s ease, filter .3s ease; }
.cmg-mq-logo { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 6px 22px; background: #fff; clip-path: circle(0% at var(--x) 50%); transition: clip-path .55s cubic-bezier(.2,.8,.2,1); }
.cmg-mq-logo img { display: block; max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; transform: scale(.85); opacity: 0; transition: transform .45s cubic-bezier(.2,.8,.2,1), opacity .25s ease; }
.cmg-marquee li.cmg-mq:hover, .cmg-marquee li.cmg-mq.is-on { border-color: #3CA9B3; box-shadow: 0 10px 26px rgba(28,73,115,.14), 0 0 0 4px rgba(60,169,179,.12); transform: translateY(-3px); }
.cmg-marquee li.cmg-mq:hover .cmg-mq-face, .cmg-marquee li.cmg-mq.is-on .cmg-mq-face { transform: translateY(-140%); opacity: 0; filter: blur(2px); }
.cmg-marquee li.cmg-mq:hover .cmg-mq-logo, .cmg-marquee li.cmg-mq.is-on .cmg-mq-logo { clip-path: circle(150% at var(--x) 50%); }
.cmg-marquee li.cmg-mq:hover .cmg-mq-logo img, .cmg-marquee li.cmg-mq.is-on .cmg-mq-logo img { transform: scale(1); opacity: 1; }
.cmg-marquee ul { padding-top: 10px; padding-bottom: 12px; } /* room for the lift + glow */
@media (prefers-reduced-motion: reduce) {
	.cmg-mq-face, .cmg-mq-logo, .cmg-mq-logo img, .cmg-marquee li.cmg-mq { transition: none !important; }
}
