/*
 * AIDNI v2 — chrome: fonts, tokens, ambient field, dock navigation,
 * mega panel, mobile sheet, buttons, footer, world map component.
 * Loaded on every page.
 */

/* =============================================================================
   FONTS — Funnel Display (display) + Instrument Sans (text), SIL OFL 1.1
   ============================================================================= */

@font-face {
	font-family: 'Funnel Display';
	font-style: normal;
	font-display: swap;
	font-weight: 300 800;
	src: url( ../fonts/funnel-display-latin-wght-normal.woff2 ) format( 'woff2-variations' );
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
	font-family: 'Funnel Display';
	font-style: normal;
	font-display: swap;
	font-weight: 300 800;
	src: url( ../fonts/funnel-display-latin-ext-wght-normal.woff2 ) format( 'woff2-variations' );
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
	font-family: 'Instrument Sans';
	font-style: normal;
	font-display: swap;
	font-weight: 400 700;
	src: url( ../fonts/instrument-sans-latin-wght-normal.woff2 ) format( 'woff2-variations' );
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
	font-family: 'Instrument Sans';
	font-style: normal;
	font-display: swap;
	font-weight: 400 700;
	src: url( ../fonts/instrument-sans-latin-ext-wght-normal.woff2 ) format( 'woff2-variations' );
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* =============================================================================
   TOKENS
   ============================================================================= */

:root {
	color-scheme: light;
	interpolate-size: allow-keywords;

	--color-ink:    #3a1a5c;
	--color-muted:  #6a5f78;
	--color-paper:  #fbf8f3;
	--color-white:  #fff;
	--color-line:   rgba( 58, 26, 92, .12 );
	--color-coral:  #ed6744;
	--color-pink:   #d53a75;
	--color-violet: #7135b6;

	--gradient: linear-gradient( 120deg, #ed6744, #d53a75 52%, #7135b6 );
	--gradient-v: linear-gradient( 180deg, #ed6744, #d53a75 50%, #7135b6 );

	--font-body:    'Instrument Sans', 'Segoe UI', -apple-system, BlinkMacSystemFont, Arial, sans-serif;
	--font-heading: 'Funnel Display', 'Instrument Sans', -apple-system, Arial, sans-serif;

	--wrap: 1240px;
	--gutter: 28px;
	--radius-xl: 32px;
	--radius-lg: 24px;
	--radius-md: 16px;
	--radius-sm: 12px;

	--glass-bg:        rgba( 255, 255, 255, .5 );
	--glass-bg-strong: rgba( 255, 255, 255, .78 );
	--glass-edge:      rgba( 58, 26, 92, .1 );
	--glass-highlight: rgba( 255, 255, 255, .9 );
	--glass-blur:      18px;
	--glass-shadow:    inset 0 1px 0 var(--glass-highlight), 0 22px 48px -32px rgba( 58, 26, 92, .38 );
	--glass-shadow-lift: inset 0 1px 0 var(--glass-highlight), 0 34px 70px -34px rgba( 113, 53, 182, .45 );

	--ambient-1: rgba( 237, 103, 68, .2 );
	--ambient-2: rgba( 113, 53, 182, .17 );
	--ambient-3: rgba( 213, 58, 117, .15 );

	--map-dot:   rgba( 58, 26, 92, .2 );
	--map-pulse: #ed6744;

	--foot-bg:   #21122f;
	--foot-text: #cbbfd9;

	--ease-out: cubic-bezier( .22, 1, .36, 1 );
	--ease-spring: cubic-bezier( .3, 1.35, .5, 1 );
}

:root[data-theme="dark"] {
	color-scheme: dark;

	--color-ink:    #f1e9f8;
	--color-muted:  #b7aac8;
	--color-paper:  #140a22;
	--color-line:   rgba( 255, 255, 255, .1 );
	--color-pink:   #f0679b;
	--color-violet: #a57de6;

	--glass-bg:        rgba( 255, 255, 255, .045 );
	--glass-bg-strong: rgba( 32, 18, 50, .82 );
	--glass-edge:      rgba( 255, 255, 255, .1 );
	--glass-highlight: rgba( 255, 255, 255, .07 );
	--glass-shadow:    inset 0 1px 0 var(--glass-highlight), 0 24px 56px -30px rgba( 0, 0, 0, .85 );
	--glass-shadow-lift: inset 0 1px 0 rgba( 255, 255, 255, .1 ), 0 34px 80px -34px rgba( 213, 58, 117, .38 );

	--ambient-1: rgba( 237, 103, 68, .14 );
	--ambient-2: rgba( 113, 53, 182, .3 );
	--ambient-3: rgba( 213, 58, 117, .16 );

	--map-dot:   rgba( 255, 255, 255, .16 );
	--map-pulse: #ffffff;

	--foot-bg:   #0c0616;
	--foot-text: #b9aecb;
}

/* =============================================================================
   BASE (chrome only — page layouts live in v2.css)
   ============================================================================= */

body {
	background: var(--color-paper);
	color: var(--color-ink);
	font-family: var(--font-body);
}

body::before {
	content: "";
	position: fixed;
	inset: -10vh -10vw;
	z-index: -1;
	pointer-events: none;
	background:
		radial-gradient( 38vmax 34vmax at 8% 6%,    var(--ambient-1), transparent 62% ),
		radial-gradient( 42vmax 40vmax at 96% 34%,  var(--ambient-2), transparent 64% ),
		radial-gradient( 40vmax 36vmax at 38% 104%, var(--ambient-3), transparent 62% );
	transform: translate3d( 0, calc( var(--scroll-y, 0) * -.035px ), 0 );
	will-change: transform;
}

.theme-transition,
.theme-transition *,
.theme-transition *::before,
.theme-transition *::after {
	transition: background-color .4s ease, color .4s ease, border-color .4s ease, fill .4s ease, stroke .4s ease !important;
}

/* The hidden attribute always wins over component display rules. */
[hidden] { display: none !important; }

.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect( 0, 0, 0, 0 );
	white-space: nowrap;
	border: 0;
}

.skip-link {
	position: fixed;
	left: -999px;
	top: 12px;
	z-index: 200;
	padding: 10px 16px;
	border-radius: 12px;
	background: var(--glass-bg-strong);
	color: var(--color-ink);
	font-weight: 600;
}

.skip-link:focus { left: 12px; }

:focus-visible {
	outline: 2px solid var(--color-pink);
	outline-offset: 3px;
}

/* Logged-in admin bar. */
.admin-bar .dock            { top: 46px; }
.admin-bar .dock.is-compact { top: 40px; }
@media ( max-width: 782px ) {
	.admin-bar .dock,
	.admin-bar .dock.is-compact { top: 56px; }
}

/* Legacy templates: make room for the floating dock. */
.aidni-legacy main,
.aidni-legacy #main { padding-top: 92px; }

/* =============================================================================
   BUTTONS
   ============================================================================= */

.pill-btn {
	--h: 46px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	height: var(--h);
	padding: 0 20px;
	border: 1px solid transparent;
	border-radius: 999px;
	font: 600 15px/1 var(--font-body);
	letter-spacing: -.005em;
	text-decoration: none;
	white-space: nowrap;
	cursor: pointer;
	transition: transform .35s var(--ease-out), box-shadow .35s ease, background-color .35s ease, background-position .6s ease, color .3s ease;
}

.pill-btn .arrow {
	width: 17px;
	height: 17px;
	flex: none;
	transition: transform .35s var(--ease-out);
}

.pill-btn:hover .arrow { transform: translateX( 3px ); }
.pill-btn:active { transform: scale( .97 ); }

.pill-btn--primary {
	color: #fff;
	background: linear-gradient( 120deg, #ed6744, #d53a75 40%, #7135b6 70%, #d53a75 ) 0 0 / 220% 100%;
	box-shadow: 0 14px 30px -14px rgba( 213, 58, 117, .7 ), inset 0 1px 0 rgba( 255, 255, 255, .25 );
}

.pill-btn--primary:hover {
	background-position: 100% 0;
	box-shadow: 0 18px 38px -14px rgba( 113, 53, 182, .7 ), inset 0 1px 0 rgba( 255, 255, 255, .25 );
}

.pill-btn--ghost {
	color: var(--color-ink);
	background: var(--glass-bg);
	border-color: var(--glass-edge);
	-webkit-backdrop-filter: blur( 14px );
	        backdrop-filter: blur( 14px );
	box-shadow: var(--glass-shadow);
}

.pill-btn--ghost:hover { background: var(--glass-bg-strong); }

.pill-btn--lg {
	--h: 56px;
	padding: 0 26px;
	font-size: 16px;
}

/* =============================================================================
   THEME SWITCH
   ============================================================================= */

.theme-switch {
	--thumb-i: 2;
	position: relative;
	display: inline-flex;
	flex: none;
	padding: 4px;
	border-radius: 999px;
	background: var(--glass-bg);
	border: 1px solid var(--glass-edge);
	-webkit-backdrop-filter: blur( var(--glass-blur) ) saturate( 150% );
	        backdrop-filter: blur( var(--glass-blur) ) saturate( 150% );
	box-shadow: var(--glass-shadow);
}

.theme-switch__thumb {
	position: absolute;
	top: 4px;
	left: 4px;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background: var(--gradient);
	box-shadow: 0 6px 16px -6px rgba( 213, 58, 117, .6 );
	transform: translateX( calc( var(--thumb-i) * 36px ) );
	transition: transform .4s var(--ease-spring);
}

.theme-switch__btn {
	position: relative;
	width: 36px;
	height: 36px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: var(--color-muted);
	display: grid;
	place-items: center;
	cursor: pointer;
	transition: color .3s ease;
}

.theme-switch__btn svg { width: 17px; height: 17px; }
.theme-switch__btn:hover { color: var(--color-ink); }
.theme-switch__btn[aria-checked="true"] { color: #fff; }

/* =============================================================================
   DOCK
   ============================================================================= */

.dock {
	position: fixed;
	top: 14px;
	left: 0;
	right: 0;
	z-index: 80;
	pointer-events: none;
	transition: top .45s var(--ease-out);
}

.dock > * { pointer-events: auto; }

.dock__row {
	width: min( var(--wrap), calc( 100% - var(--gutter) ) );
	margin: 0 auto;
	display: flex;
	align-items: center;
	gap: 12px;
}

.dock__nav {
	height: 58px;
	display: flex;
	align-items: center;
	border-radius: 999px;
	background: var(--glass-bg-strong);
	border: 1px solid var(--glass-edge);
	-webkit-backdrop-filter: blur( 22px ) saturate( 170% );
	        backdrop-filter: blur( 22px ) saturate( 170% );
	box-shadow: var(--glass-shadow);
	transition: height .45s var(--ease-out), box-shadow .45s ease;
}

.dock__brand {
	display: flex;
	align-items: center;
	flex: none;
	height: 58px;
	padding: 0 4px;
}

/* Both colourways share one box, so switching theme never changes the size. */
.dock__logo {
	height: 50px;
	width: auto;
	aspect-ratio: 1200 / 450;
	display: block;
	transition: height .45s var(--ease-out);
}

.dock__logo--dark { display: none; }
:root[data-theme="dark"] .dock__logo--light { display: none; }
:root[data-theme="dark"] .dock__logo--dark { display: block; }

/* Soft fade behind the dock keeps the bare logo legible over content. */
.dock::before {
	content: "";
	position: absolute;
	inset: -14px 0 auto;
	height: 120px;
	background: linear-gradient( 180deg, var(--color-paper) 15%, color-mix( in srgb, var(--color-paper) 0%, transparent ) );
	opacity: 0;
	transition: opacity .45s ease;
	pointer-events: none;
	z-index: -1;
}

.dock.is-compact::before { opacity: .92; }

.dock__nav {
	position: relative;
	margin: 0 auto;
	padding: 6px;
	gap: 2px;
}

.dock__link {
	position: relative;
	z-index: 1;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	height: 100%;
	padding: 0 16px;
	border: 0;
	border-radius: 999px;
	background: none;
	color: var(--color-muted);
	font: 500 15px/1 var(--font-body);
	text-decoration: none;
	cursor: pointer;
	transition: color .25s ease;
}

.dock__link:hover,
.dock__link.is-current,
.dock__link[aria-expanded="true"] { color: var(--color-ink); }

.dock__link.is-current { font-weight: 600; }

.dock__caret {
	width: 15px;
	height: 15px;
	transition: transform .35s var(--ease-out);
}

.dock__link[aria-expanded="true"] .dock__caret { transform: rotate( 180deg ); }

/* Sliding highlight that follows the pointer between links. */
.dock__indicator {
	position: absolute;
	top: 6px;
	bottom: 6px;
	left: 0;
	width: 0;
	border-radius: 999px;
	background: var(--glass-bg);
	border: 1px solid var(--glass-edge);
	opacity: 0;
	transform: translateX( var(--ind-x, 0 ) );
	width: var(--ind-w, 0 );
	transition: transform .4s var(--ease-out), width .4s var(--ease-out), opacity .25s ease;
	pointer-events: none;
}

.dock__nav.has-hover .dock__indicator { opacity: 1; }

.dock__actions {
	display: flex;
	align-items: center;
	gap: 10px;
	flex: none;
}

.dock__cta { --h: 50px; }

.dock__burger {
	display: none;
	align-items: center;
	gap: 10px;
	height: 50px;
	padding: 0 8px 0 18px;
	border-radius: 999px;
	border: 1px solid var(--glass-edge);
	background: var(--glass-bg-strong);
	-webkit-backdrop-filter: blur( 22px );
	        backdrop-filter: blur( 22px );
	box-shadow: var(--glass-shadow);
	color: var(--color-ink);
	font: 600 15px/1 var(--font-body);
	cursor: pointer;
}

.dock__burger-icon {
	position: relative;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background: var(--gradient);
}

.dock__burger-icon i {
	position: absolute;
	left: 11px;
	width: 14px;
	height: 2px;
	border-radius: 2px;
	background: #fff;
	transition: transform .35s var(--ease-out), top .35s var(--ease-out);
}

.dock__burger-icon i:first-child { top: 14px; }
.dock__burger-icon i:last-child  { top: 20px; }

.dock__burger[aria-expanded="true"] .dock__burger-icon i:first-child { top: 17px; transform: rotate( 45deg ); }
.dock__burger[aria-expanded="true"] .dock__burger-icon i:last-child  { top: 17px; transform: rotate( -45deg ); }

/* Compact once the page scrolls. */
.dock.is-compact { top: 8px; }
.dock.is-compact .dock__nav { height: 52px; box-shadow: var(--glass-shadow-lift); }
.dock.is-compact .dock__brand { height: 52px; }
.dock.is-compact .dock__logo { height: 42px; }

/* =============================================================================
   MEGA PANEL — category rail · item cards · live preview
   ============================================================================= */

@property --edge-a {
	syntax: '<angle>';
	inherits: false;
	initial-value: 0deg;
}

.mega-scrim {
	position: fixed;
	inset: 0;
	z-index: 79;
	background: rgba( 30, 14, 50, .18 );
	-webkit-backdrop-filter: blur( 8px ) saturate( 120% );
	        backdrop-filter: blur( 8px ) saturate( 120% );
	opacity: 0;
	transition: opacity .45s ease;
}

:root[data-theme="dark"] .mega-scrim { background: rgba( 5, 2, 10, .5 ); }
.mega-scrim.is-on { opacity: 1; }

.mega {
	position: relative;
	width: min( var(--wrap), calc( 100% - var(--gutter) ) );
	margin: 12px auto 0;
	border-radius: var(--radius-xl);
	background: var(--glass-bg-strong);
	border: 1px solid var(--glass-edge);
	-webkit-backdrop-filter: blur( 34px ) saturate( 180% );
	        backdrop-filter: blur( 34px ) saturate( 180% );
	box-shadow: 0 50px 110px -40px rgba( 58, 26, 92, .55 ), inset 0 1px 0 var(--glass-highlight);
	max-height: calc( 100vh - 110px );
	overflow: auto;
	scrollbar-width: none;
	clip-path: inset( 0 0 100% 0 round var(--radius-xl) );
	opacity: 0;
	transform: translateY( -12px ) scale( .985 );
	transform-origin: 30% 0;
	transition:
		clip-path .65s cubic-bezier( .22, 1, .36, 1 ),
		transform .65s cubic-bezier( .22, 1, .36, 1 ),
		opacity .3s ease;
}

.mega.is-open {
	clip-path: inset( 0 0 0 0 round var(--radius-xl) );
	opacity: 1;
	transform: none;
}

.mega.is-closing {
	transition-duration: .3s, .3s, .25s;
}

/* Slow-rotating gradient edge. */
.mega__edge {
	position: absolute;
	inset: 0;
	z-index: 2;
	padding: 1.2px;
	border-radius: inherit;
	background: conic-gradient( from var(--edge-a), transparent 0 62%, #ed6744 72%, #d53a75 80%, #7135b6 88%, transparent 96% );
	-webkit-mask: linear-gradient( #000 0 0 ) content-box, linear-gradient( #000 0 0 );
	-webkit-mask-composite: xor;
	        mask: linear-gradient( #000 0 0 ) content-box exclude, linear-gradient( #000 0 0 );
	pointer-events: none;
	animation: edge-spin 7s linear infinite;
	opacity: .9;
}

@keyframes edge-spin {
	to { --edge-a: 360deg; }
}

.mega__inner {
	display: grid;
	grid-template-columns: 236px minmax( 0, 1fr ) 288px;
	min-height: 440px;
}

/* Rail */
.mega__rail {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 6px;
	padding: 22px 16px;
	border-right: 1px solid var(--color-line);
}

.mega__rail-ink {
	position: absolute;
	left: 16px;
	right: 16px;
	top: 0;
	height: var(--ink-h, 72px);
	border-radius: 20px;
	background: var(--glass-bg);
	border: 1px solid var(--glass-edge);
	box-shadow: var(--glass-shadow);
	transform: translateY( var(--ink-y, 22px) );
	transition: transform .5s cubic-bezier( .3, 1.25, .5, 1 ), height .4s ease;
	pointer-events: none;
}

.mega__tab {
	position: relative;
	z-index: 1;
	display: grid;
	grid-template-columns: 46px 1fr 16px;
	align-items: center;
	gap: 14px;
	padding: 13px 14px;
	border: 0;
	border-radius: 20px;
	background: none;
	color: var(--color-muted);
	text-align: left;
	cursor: pointer;
	opacity: 0;
	transform: translateX( -12px );
	transition: color .3s ease, opacity .5s ease, transform .6s cubic-bezier( .22, 1, .36, 1 );
}

.mega.is-open .mega__tab { opacity: 1; transform: none; }
.mega.is-open .mega__tab:nth-of-type( 1 ) { transition-delay: 0s, .12s, .12s; }
.mega.is-open .mega__tab:nth-of-type( 2 ) { transition-delay: 0s, .18s, .18s; }
.mega.is-open .mega__tab:nth-of-type( 3 ) { transition-delay: 0s, .24s, .24s; }

.mega__tab-icon {
	width: 46px;
	height: 46px;
	display: grid;
	place-items: center;
	border-radius: 15px;
	background: rgba( 213, 58, 117, .08 );
	border: 1px solid rgba( 213, 58, 117, .22 );
	color: var(--color-pink);
	transition: background .35s ease, color .35s ease, border-color .35s ease, transform .5s cubic-bezier( .3, 1.4, .5, 1 );
}

.mega__tab-icon svg { width: 21px; height: 21px; }

.mega__tab-text { display: grid; gap: 3px; }

.mega__tab-label {
	font: 400 19px/1.1 var(--font-heading);
	letter-spacing: -.015em;
	color: var(--color-ink);
}

.mega__tab-count { font-size: 13px; white-space: nowrap; }

.mega__tab-chev {
	width: 16px;
	height: 16px;
	opacity: 0;
	transform: translateX( -6px );
	transition: opacity .3s ease, transform .35s ease;
}

.mega__tab[aria-selected="true"] { color: var(--color-ink); }

.mega__tab[aria-selected="true"] .mega__tab-icon {
	background: var(--gradient);
	border-color: transparent;
	color: #fff;
	transform: rotate( -6deg ) scale( 1.04 );
}

.mega__tab[aria-selected="true"] .mega__tab-chev { opacity: 1; transform: none; color: var(--color-pink); }

/* Panels */
.mega__panels { position: relative; min-width: 0; }

.mega__panel { padding: 24px 26px 22px; }

.mega__panel-head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 20px;
	margin: 0 12px 16px;
	padding-bottom: 16px;
	border-bottom: 1px dashed var(--color-line);
}

.mega__panel-lead {
	margin: 0;
	max-width: 48ch;
	font-size: 14.5px;
	line-height: 1.5;
	color: var(--color-muted);
}

.mega__all {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	flex: none;
	color: var(--color-pink);
	font-size: 14px;
	font-weight: 600;
	text-decoration: none;
	white-space: nowrap;
}

.mega__all .arrow { width: 15px; height: 15px; transition: transform .35s var(--ease-out); }
.mega__all:hover .arrow { transform: translateX( 3px ); }

.mega__grid {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 2px 8px;
}

.mega.is-open .mega__panel:not( [hidden] ) .mega__grid > li {
	animation: mega-item .55s cubic-bezier( .22, 1, .36, 1 ) both;
	animation-delay: calc( var(--i, 0) * 30ms + 140ms );
}

@keyframes mega-item {
	from { opacity: 0; transform: translateY( 10px ); filter: blur( 3px ); }
	to   { opacity: 1; transform: none; filter: none; }
}

.mega__item {
	position: relative;
	display: grid;
	grid-template-columns: 44px minmax( 0, 1fr ) 18px;
	align-items: center;
	gap: 14px;
	padding: 10px 12px;
	border-radius: 18px;
	color: var(--color-ink);
	text-decoration: none;
	transition: background-color .25s ease;
}

.mega__item:hover,
.mega__item:focus-visible,
.mega__item.is-preview { background: var(--glass-bg); }

.mega__item-icon {
	width: 44px;
	height: 44px;
	display: grid;
	place-items: center;
	border-radius: 14px;
	background: var(--glass-bg);
	border: 1px solid var(--glass-edge);
	color: var(--color-pink);
	transition: background .3s ease, color .3s ease, border-color .3s ease, transform .45s cubic-bezier( .3, 1.4, .5, 1 );
}

.mega__item-icon svg { width: 21px; height: 21px; }
.mega__item-icon .art { width: 30px; height: 30px; }

.mega__item:hover .mega__item-icon,
.mega__item:focus-visible .mega__item-icon {
	background: var(--gradient);
	border-color: transparent;
	color: #fff;
	transform: scale( 1.06 ) rotate( -4deg );
}

.mega__item-text { display: grid; gap: 2px; min-width: 0; }

.mega__item-title {
	font-size: 15px;
	font-weight: 500;
	line-height: 1.3;
}

.mega__item-blurb {
	font-size: 12.5px;
	line-height: 1.4;
	color: var(--color-muted);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.mega__item-go {
	width: 18px;
	height: 18px;
	color: var(--color-pink);
	opacity: 0;
	transform: translateX( -8px );
	transition: opacity .25s ease, transform .35s var(--ease-out);
}

.mega__item:hover .mega__item-go,
.mega__item:focus-visible .mega__item-go { opacity: 1; transform: none; }

/* Preview */
.mega__preview {
	display: flex;
	flex-direction: column;
	padding: 22px;
	border-left: 1px solid var(--color-line);
	opacity: 0;
	transform: translateY( 10px );
	transition: opacity .5s ease .25s, transform .6s cubic-bezier( .22, 1, .36, 1 ) .25s;
}

.mega.is-open .mega__preview { opacity: 1; transform: none; }

.mega__stage {
	position: relative;
	height: 210px;
	margin-bottom: 20px;
	border-radius: 24px;
	overflow: hidden;
	isolation: isolate;
	background:
		radial-gradient( 90% 80% at 0% 0%, rgba( 237, 103, 68, .18 ), transparent 60% ),
		radial-gradient( 90% 80% at 100% 100%, rgba( 113, 53, 182, .22 ), transparent 60% ),
		var(--glass-bg);
	border: 1px solid var(--glass-edge);
}

.mega__stage-orb {
	position: absolute;
	z-index: -1;
	width: 160px;
	height: 160px;
	left: 50%;
	top: 50%;
	margin: -80px 0 0 -80px;
	border-radius: 50%;
	background: radial-gradient( closest-side, rgba( 213, 58, 117, .35 ), transparent );
	filter: blur( 10px );
	animation: orb-drift 9s ease-in-out infinite alternate;
}

@keyframes orb-drift {
	0%   { transform: translate( -40px, -20px ) scale( .9 ); }
	100% { transform: translate( 40px, 20px ) scale( 1.15 ); }
}

.mega__stage-layer {
	position: absolute;
	inset: 0;
	display: grid;
	place-items: center;
	transition: opacity .45s ease, transform .6s cubic-bezier( .22, 1, .36, 1 );
}

.mega__stage-layer--map { padding: 18px 14px; }
.mega__stage-layer--map .world-map { width: 100%; margin: 0; --map-dot: rgba( 58, 26, 92, .32 ); }
:root[data-theme="dark"] .mega__stage-layer--map .world-map { --map-dot: rgba( 255, 255, 255, .26 ); }

.mega__stage-layer--art { color: var(--color-pink); }

.mega__stage-layer--art svg {
	width: 42%;
	height: 42%;
	stroke-width: 1.2;
	filter: drop-shadow( 0 10px 20px rgba( 213, 58, 117, .25 ) );
}

.mega__stage-layer--art svg.art { width: 52%; height: 52%; }

.mega__stage-layer--art.is-drawing svg * {
	stroke-dasharray: 140;
	animation: stage-draw 1.3s cubic-bezier( .65, 0, .35, 1 ) both;
}

@keyframes stage-draw {
	from { stroke-dashoffset: 140; }
	to   { stroke-dashoffset: 0; }
}

.mega__preview[data-mode="markets"] .mega__stage-layer--art,
.mega__preview:not( [data-mode="markets"] ) .mega__stage-layer--map {
	opacity: 0;
	transform: scale( .92 );
	pointer-events: none;
}

.world-map--mega .map-arc__line { stroke-width: 3; }
.world-map--mega .map-hub__dot { stroke-width: 3; }

.mega__preview-group,
.mega__preview-title,
.mega__preview-text { transition: opacity .25s ease, transform .35s ease; }

.mega__preview.is-swapping .mega__preview-group,
.mega__preview.is-swapping .mega__preview-title,
.mega__preview.is-swapping .mega__preview-text { opacity: 0; transform: translateY( 6px ); }

.mega__preview-group {
	margin: 0 0 6px;
	font-size: 13px;
	font-weight: 600;
	color: var(--color-pink);
}

.mega__preview-title {
	margin: 0 0 8px;
	font: 400 22px/1.18 var(--font-heading);
	letter-spacing: -.015em;
}

.mega__preview-text {
	margin: 0;
	font-size: 14.5px;
	line-height: 1.55;
	color: var(--color-muted);
}

/* Footer strip */
.mega__foot {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	padding: 14px 18px 14px 30px;
	border-top: 1px solid var(--color-line);
	background: linear-gradient( 90deg, rgba( 237, 103, 68, .06 ), rgba( 113, 53, 182, .08 ) );
	opacity: 0;
	transition: opacity .5s ease .3s;
}

.mega.is-open .mega__foot { opacity: 1; }

.mega__foot p {
	margin: 0;
	font-size: 15px;
	font-weight: 500;
}

.mega__foot-actions {
	display: flex;
	align-items: center;
	gap: 18px;
}

.mega__foot-link {
	color: var(--color-muted);
	font-size: 14.5px;
	font-weight: 600;
	text-decoration: none;
}

.mega__foot-link:hover { color: var(--color-pink); }
.mega__foot .pill-btn { --h: 42px; font-size: 14.5px; }

@media ( max-width: 1320px ) {
	.mega__inner { grid-template-columns: 236px minmax( 0, 1fr ) 236px; }
	.mega__tab-label { font-size: 17px; }
	.mega__rail { padding-inline: 12px; }
	.mega__rail-ink { left: 12px; right: 12px; }
	.mega__tab { grid-template-columns: 40px 1fr 14px; gap: 12px; padding: 12px; }
	.mega__tab-icon { width: 40px; height: 40px; }
	.mega__panel { padding-inline: 18px; }
	.mega__preview { padding: 18px; }
	.mega__stage { height: 170px; }
}

@media ( max-width: 1100px ) {
	.mega__item-blurb { display: none; }
}

@media ( prefers-reduced-motion: reduce ) {
	.mega,
	.mega__tab,
	.mega__preview,
	.mega__foot { transition: none; }
	.mega { clip-path: none; transform: none; }
	.mega.is-open .mega__panel:not( [hidden] ) .mega__grid > li,
	.mega__edge,
	.mega__stage-orb,
	.mega__stage-layer--art.is-drawing svg * { animation: none; }
}

/* =============================================================================
   MOBILE SHEET
   ============================================================================= */

.sheet {
	position: fixed;
	inset: 0;
	z-index: 95;
}

.sheet__scrim {
	position: absolute;
	inset: 0;
	background: rgba( 20, 10, 34, .45 );
	-webkit-backdrop-filter: blur( 4px );
	        backdrop-filter: blur( 4px );
	opacity: 0;
	transition: opacity .35s ease;
}

.sheet__panel {
	position: absolute;
	left: 10px;
	right: 10px;
	bottom: 10px;
	max-height: calc( 100% - 90px );
	overflow: auto;
	padding: 22px 22px 26px;
	border-radius: 28px;
	background: var(--glass-bg-strong);
	border: 1px solid var(--glass-edge);
	-webkit-backdrop-filter: blur( 30px ) saturate( 170% );
	        backdrop-filter: blur( 30px ) saturate( 170% );
	box-shadow: 0 -20px 60px -20px rgba( 20, 10, 34, .5 );
	transform: translateY( 105% );
	transition: transform .5s var(--ease-out);
}

.sheet.is-open .sheet__scrim { opacity: 1; }
.sheet.is-open .sheet__panel { transform: none; }

.sheet__top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 14px;
}

.sheet__title {
	font-weight: 600;
	color: var(--color-muted);
}

.sheet__nav { display: grid; }

.sheet__link,
.sheet__group summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 14px 2px;
	border-bottom: 1px solid var(--color-line);
	color: var(--color-ink);
	font: 500 26px/1.1 var(--font-heading);
	letter-spacing: -.02em;
	text-decoration: none;
	list-style: none;
	cursor: pointer;
}

.sheet__group summary::-webkit-details-marker { display: none; }

.sheet__group summary span {
	font: 600 13px/1 var(--font-body);
	color: var(--color-pink);
	padding: 6px 10px;
	border-radius: 999px;
	background: var(--glass-bg);
}

.sheet__sub {
	display: grid;
	padding: 8px 0 12px;
}

.sheet__sub a {
	padding: 9px 2px;
	color: var(--color-muted);
	font-size: 16px;
	text-decoration: none;
}

.sheet__cta {
	width: 100%;
	margin-top: 20px;
	--h: 56px;
}

/* =============================================================================
   FOOTER
   ============================================================================= */

.foot {
	position: relative;
	margin-top: 40px;
	padding: 72px 0 96px;
	background: var(--foot-bg);
	color: var(--foot-text);
	overflow: hidden;
	isolation: isolate;
}

.foot::before {
	content: "";
	position: absolute;
	inset: 0 0 auto;
	height: 1px;
	background: var(--gradient);
	opacity: .7;
}

.foot::after {
	content: "";
	position: absolute;
	z-index: -1;
	width: 60vmax;
	height: 40vmax;
	right: -20vmax;
	top: -22vmax;
	background: radial-gradient( closest-side, rgba( 213, 58, 117, .2 ), transparent );
	pointer-events: none;
}

.foot__wrap {
	width: min( var(--wrap), calc( 100% - var(--gutter) * 1.5 ) );
	margin: 0 auto;
	display: grid;
	grid-template-columns: minmax( 260px, 1fr ) 2.6fr;
	gap: 48px 64px;
}

.foot__logo {
	height: 64px;
	aspect-ratio: 1200 / 450;
	width: auto;
	display: block;
	margin-bottom: 18px;
}

.foot__desc {
	margin: 0 0 22px;
	max-width: 34ch;
	line-height: 1.6;
}

.foot__offices {
	list-style: none;
	margin: 0 0 18px;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.foot__offices li {
	padding: 7px 12px;
	border-radius: 999px;
	border: 1px solid rgba( 255, 255, 255, .14 );
	font-size: 13px;
	color: #fff;
}

.foot__contact {
	display: grid;
	gap: 6px;
	font-size: 14px;
}

.foot a {
	color: inherit;
	text-decoration: none;
	transition: color .2s ease;
}

.foot a:hover { color: #fff; }

.foot__cols {
	display: grid;
	grid-template-columns: repeat( 4, 1fr );
	gap: 32px;
}

.foot__col {
	display: grid;
	align-content: start;
	gap: 9px;
	font-size: 14px;
}

.foot__title {
	margin: 0 0 6px;
	font: 600 14px/1 var(--font-body);
	color: #fff;
}

.foot__base {
	grid-column: 1 / -1;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	padding-top: 24px;
	border-top: 1px solid rgba( 255, 255, 255, .12 );
	font-size: 13px;
}

.foot__motto {
	font-family: var(--font-heading);
	font-size: 15px;
	background: var(--gradient);
	-webkit-background-clip: text;
	        background-clip: text;
	color: transparent;
}

.foot__top {
	display: inline-flex;
	align-items: center;
	gap: 8px;
}

.foot__top svg { width: 16px; height: 16px; }

/* WhatsApp chip */
.wa-chip {
	position: fixed;
	right: 20px;
	bottom: 20px;
	z-index: 70;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	height: 50px;
	padding: 0 18px 0 14px;
	border-radius: 999px;
	color: #fff;
	background: #1fae56;
	box-shadow: 0 16px 34px -14px rgba( 31, 174, 86, .8 ), inset 0 1px 0 rgba( 255, 255, 255, .3 );
	font: 600 14px/1 var(--font-body);
	text-decoration: none;
	transition: transform .35s var(--ease-out);
}

.wa-chip:hover { transform: translateY( -3px ); }

/* =============================================================================
   WORLD MAP COMPONENT (dock preview, home, market pages)
   ============================================================================= */

.world-map {
	position: relative;
	margin: 0;
}

.world-map__canvas {
	position: relative;
	aspect-ratio: 1000 / 418.8;
}

.world-map__dots {
	position: absolute;
	inset: 0;
	background: var(--map-dot);
	-webkit-mask: var(--map-src) center / 100% 100% no-repeat;
	        mask: var(--map-src) center / 100% 100% no-repeat;
}

.world-map__svg {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	overflow: visible;
}

.map-arc { transition: opacity .35s ease; }

.map-arc__line,
.map-arc__pulse {
	fill: none;
	stroke-linecap: round;
}

.map-arc__line {
	stroke-width: 1.8;
	stroke-dasharray: 1 1;
	stroke-dashoffset: 1;
	transition: stroke-dashoffset 1.8s cubic-bezier( .65, 0, .35, 1 ) calc( var(--i, 0) * .16s + .2s ), stroke-width .3s ease;
}

.map-arc__pulse {
	stroke: var(--map-pulse);
	stroke-width: 3.6;
	stroke-dasharray: .035 .965;
	stroke-dashoffset: 1;
	opacity: 0;
}

.world-map.is-drawn .map-arc__line { stroke-dashoffset: 0; }

.world-map.is-drawn .map-arc__pulse {
	opacity: .95;
	animation: map-pulse 3.4s cubic-bezier( .45, 0, .55, 1 ) calc( var(--i, 0) * .4s + 2.2s ) infinite alternate both;
}

@keyframes map-pulse {
	from { stroke-dashoffset: 1; }
	to   { stroke-dashoffset: .035; }
}

.map-hub__dot {
	fill: var(--color-pink);
	stroke: var(--color-paper);
	stroke-width: 2;
}

.map-hub--presence .map-hub__dot { fill: var(--color-violet); }

.map-hub__ring {
	fill: none;
	stroke: var(--color-pink);
	stroke-width: 1.2;
	opacity: 0;
	transform-box: fill-box;
	transform-origin: center;
}

.map-hub--presence .map-hub__ring { stroke: var(--color-violet); }

.world-map.is-drawn .map-hub--presence .map-hub__ring { animation: hub-ping 2.8s ease-out infinite; }

@keyframes hub-ping {
	0%   { opacity: .7; transform: scale( .4 ); }
	100% { opacity: 0;  transform: scale( 1.5 ); }
}

.map-label {
	position: absolute;
	transform: translate( -50%, calc( -100% - 12px ) );
	padding: 5px 11px;
	border-radius: 999px;
	font-size: 12.5px;
	font-weight: 600;
	white-space: nowrap;
	color: var(--color-ink);
	background: var(--glass-bg);
	border: 1px solid var(--glass-edge);
	-webkit-backdrop-filter: blur( 12px );
	        backdrop-filter: blur( 12px );
	opacity: 0;
	pointer-events: none;
	transition: opacity .5s ease, background-color .3s ease;
}

.map-label--india  { transform: translate( -50%, 14px ); }
.map-label--me     { transform: translate( calc( -100% - 12px ), -50% ); }
.map-label--asean,
.map-label--africa { transform: translate( -50%, 12px ); }
.map-label--hk     { transform: translate( 12px, -50% ); }

.world-map.is-drawn .map-label { opacity: 1; transition-delay: 1.4s; }

.world-map.has-active .map-arc:not( .is-active ) { opacity: .12; }
.world-map.has-active .map-arc.is-active .map-arc__line { stroke-width: 3; }
.world-map.has-active .map-label:not( .is-active ) { opacity: .3; transition-delay: 0s; }
.world-map.has-active .map-label.is-active { background: var(--glass-bg-strong); transition-delay: 0s; }
.world-map.has-active .map-hub.is-active .map-hub__ring { animation: hub-ping 1.6s ease-out infinite; }

.world-map__legend {
	display: flex;
	gap: 22px;
	justify-content: flex-end;
	margin-top: 12px;
	font-size: 13px;
	color: var(--color-muted);
}

.world-map__key {
	display: inline-flex;
	align-items: center;
	gap: 8px;
}

.world-map__key::before {
	content: "";
	width: 9px;
	height: 9px;
	border-radius: 50%;
	background: var(--color-pink);
}

.world-map__key--presence::before {
	background: var(--color-violet);
	box-shadow: 0 0 0 4px rgba( 113, 53, 182, .18 );
}

/* =============================================================================
   RESPONSIVE
   ============================================================================= */

@media ( max-width: 1180px ) {
	.dock__link { padding: 0 12px; }
	.dock .theme-switch--dock { display: none; }
}

@media ( max-width: 980px ) {
	.dock__nav,
	.dock__cta { display: none; }
	.dock__burger { display: inline-flex; }
	.dock__row { justify-content: space-between; }
	.mega,
	.mega-scrim { display: none !important; }

	.foot__wrap { grid-template-columns: 1fr; }
	.foot__cols { grid-template-columns: repeat( 2, 1fr ); }
}

@media ( max-width: 600px ) {
	:root { --gutter: 20px; --glass-blur: 10px; }
	.dock { top: 10px; }
	.dock__brand { height: 52px; }
	.dock__logo,
	.dock.is-compact .dock__logo { height: 40px; }
	.dock__burger { height: 52px; }
	.foot { padding-top: 56px; }
	.foot__base { flex-direction: column; align-items: flex-start; }
	.wa-chip { right: 14px; bottom: 14px; width: 50px; padding: 0; justify-content: center; }
	.wa-chip span { display: none; }
	.map-label { display: none; }
	.world-map__legend { justify-content: flex-start; }
}

@media ( prefers-reduced-motion: reduce ) {
	body::before { transform: none; }
	.map-arc__line { transition: none; }
	.map-arc__pulse { display: none; }
	.theme-switch__thumb,
	.dock__indicator,
	.mega,
	.sheet__panel { transition: none; }
}
