/* =============================================================
   Stock Pathshala — floating pill header

   A replica of the header on the Next.js homepage
   (stockpathshala.com), rebuilt in plain CSS so the WordPress
   class pages match it exactly.

   Everything is namespaced .sph- and scoped under
   .sp-landing-body, so this file cannot affect any other page
   and cannot collide with sp-landing.css.

   Tailwind classes on the original, translated:
     bg-gray-950                      -> #030712
     from-yellow-300 via-orange-500
       to-red-600                     -> the CTA gradient
     top-[10px] / h-[calc(8dvh)]      -> --sph-top / --sph-h
     w-[98%] xl:w-[80%] 2xl:w-[65%]   -> the pill width steps
     [@media(min-width:800px)]        -> --sph-bp, the nav breakpoint
   ========================================================== */

.sp-landing-body {
	--sph-top:     10px;
	--sph-h:       55px;
	--sph-bg:      #030712;
	--sph-text:    #e8ecf4;
	--sph-hover:   #ffffff;
	--sph-radius:  999px;

	/* The header is fixed, so the page needs to start below it. */
	padding-top: calc( var(--sph-top) + var(--sph-h) + 12px );
}

/* -------------------------------------------------------------
   SHELL
   ----------------------------------------------------------- */
.sph {
	position: fixed;
	top: var(--sph-top);
	left: 0;
	right: 0;
	z-index: 100;
	display: flex;
	justify-content: center;
	pointer-events: none; /* only the pill itself is clickable */
}

.sph__pill {
	pointer-events: auto;
	width: 98%;
	min-height: 45px;
	height: var(--sph-h);
	background: var(--sph-bg);
	border-radius: var(--sph-radius);
	box-shadow: 0 6px 24px rgba(3, 7, 18, .18);
}

.sph__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	height: 100%;
	width: 100%;
	padding-inline: 10px;
	border-radius: var(--sph-radius);
	backdrop-filter: blur(20px);
}

/* -------------------------------------------------------------
   LOGO
   ----------------------------------------------------------- */
.sph__logo {
	display: inline-flex;
	align-items: center;
	gap: 9px;
	flex-shrink: 0;
	height: 80%;
	text-decoration: none;
	padding-left: 6px;
}
.sph__logo img {
	height: 100%;
	width: auto;
	max-width: 210px;
	object-fit: contain;
	display: block;
}

/* Fallback wordmark, used when no logo image is set. Tuned for a
   dark ground, since the site logo is dark-on-light. */
.sph__mark { display: flex; flex-shrink: 0; }
.sph__word {
	display: flex;
	flex-direction: column;
	line-height: 1;
	white-space: nowrap;
}
.sph__word b {
	font-family: "Poppins", "Inter", sans-serif;
	font-size: 16px;
	font-weight: 700;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: #fff;
}
.sph__word small {
	margin-top: 3px;
	font-size: 7.5px;
	font-weight: 600;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: #f5a623;
}

/* -------------------------------------------------------------
   NAV  (desktop only — see the breakpoint note at the bottom)
   ----------------------------------------------------------- */
.sph__nav { display: none; }

.sph__nav a {
	display: inline-flex;
	align-items: center;
	font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	font-size: 15px;
	font-weight: 500;
	color: var(--sph-text);
	text-decoration: none;
	white-space: nowrap;
	padding: 6px 2px;
	transition: color .16s ease;
}
.sph__nav a:hover,
.sph__nav a:focus-visible { color: var(--sph-hover); }

.sph__actions { display: none; }

/* -------------------------------------------------------------
   DOWNLOAD APP BUTTON
   ----------------------------------------------------------- */
.sph__cta {
	position: relative;
	overflow: hidden;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: fit-content;
	white-space: nowrap;
	border-radius: var(--sph-radius);
	background: linear-gradient( to right, #fde047, #f97316, #dc2626 );
	padding: 6px 15px;
	font-family: "Inter", sans-serif;
	font-size: 14px;
	font-weight: 600;
	color: #f8fafc;
	text-decoration: none;
}

/* The sweeping highlight on the original button. */
.sph__shine {
	position: absolute;
	top: -60px;
	left: -30%;
	height: 100px;
	width: 20px;
	transform: rotate(20deg);
	background: #fff;
	opacity: .4;
	pointer-events: none;
	animation: sph-shine 3.2s ease-in-out infinite;
}
@keyframes sph-shine {
	0%,
	72%  { left: -30%; }
	100% { left: 130%; }
}

/* -------------------------------------------------------------
   BURGER + DRAWER
   ----------------------------------------------------------- */
.sph__burger {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	width: 40px;
	height: 40px;
	margin-right: 2px;
	padding: 0;
	background: none;
	border: 0;
	border-radius: 50%;
	color: #f8fafc;
	cursor: pointer;
}
.sph__burger:hover { background: rgba(255, 255, 255, .08); }
.sph__burger svg { display: block; }

.sph__drawer {
	pointer-events: auto;
	position: absolute;
	top: calc( 100% + 8px );
	left: 1%;
	right: 1%;
	background: var(--sph-bg);
	border-radius: 18px;
	box-shadow: 0 18px 50px rgba(3, 7, 18, .35);
	padding: 10px;
	display: none;
}
.sph__drawer.is-open { display: block; }

.sph__drawer a {
	display: block;
	padding: 13px 14px;
	font-family: "Inter", sans-serif;
	font-size: 15px;
	font-weight: 500;
	color: var(--sph-text);
	text-decoration: none;
	border-radius: 10px;
}
.sph__drawer a:hover { background: rgba(255, 255, 255, .07); color: #fff; }

.sph__drawer .sph__cta {
	display: flex;
	margin-top: 8px;
	padding: 12px 18px;
	font-size: 15px;
	color: #fff;
}
.sph__drawer .sph__cta:hover { background: linear-gradient( to right, #fde047, #f97316, #dc2626 ); }

/* -------------------------------------------------------------
   RESPONSIVE

   The original hides the nav under 800px but only shows the
   hamburger under 600px, which leaves 600-799px with no way to
   navigate at all. The burger is switched at the same 800px here
   so there is never a gap.
   ----------------------------------------------------------- */
@media (min-width: 800px) {

	.sph__inner {
		justify-content: space-around;
		padding-inline: 30px;
	}

	.sph__nav {
		display: flex;
		align-items: center;
		justify-content: space-evenly;
		flex: 1;
		height: 100%;
		gap: 8px;
	}

	.sph__actions {
		display: flex;
		align-items: center;
		justify-content: center;
		gap: 15px;
		height: 100%;
		width: fit-content;
		flex-shrink: 0;
	}

	.sph__burger,
	.sph__drawer { display: none; }
}

@media (min-width: 1000px) {
	.sp-landing-body { --sph-h: 60px; }
}

@media (min-width: 1024px) {
	.sph__cta { padding: 6px 20px; font-size: 16px; }
}

/* Pill width steps, matching w-98% / xl:80% / 2xl:65%. */
@media (min-width: 1280px) {
	.sph__pill { width: 80%; max-width: 80rem; }
}
@media (min-width: 1536px) {
	.sph__pill { width: 65%; max-width: 120rem; }
}

@media (prefers-reduced-motion: reduce) {
	.sph__shine { animation: none; opacity: 0; }
}