/* ============================================================
   Header Override – come-site-header structure
   Matches comecom.app layout, adapted for twentytwentyfive palette
   ============================================================ */

/* --- Shell / Container --- */
.come-site-shell {
	width: min(var(--come-width, 1200px), calc(100% - 48px));
	margin: 0 auto;
}

/* --- Top Social Bar (fixed download row) --- */
header.wp-block-template-part {
	padding-top: var(--come-chrome-height, 149px);
}

.come-top-social-bar {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: 52;
	background: #1fd267;
	border-bottom: 1px solid rgba(0, 0, 0, 0.06);
	box-shadow: 0 4px 12px rgba(6, 24, 43, 0.08);
}

.come-top-social-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 18px;
	padding: 10px 0;
}

.come-top-social-actions {
	display: flex;
	align-items: center;
	gap: 12px;
	flex: 0 1 auto;
}

.come-top-social-actions .come-btn {
	padding: 8px 16px;
	font-size: 13px;
	min-width: 0;
	white-space: nowrap;
}

.come-top-social-links {
	display: flex;
	align-items: center;
	gap: 14px;
	flex-wrap: wrap;
}

.come-top-social-links span {
	font-size: 0.9rem;
	font-weight: 700;
	letter-spacing: 0.3px;
	color: #06182b;
}

.come-top-social-links a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border-radius: 999px;
	background: rgba(0, 0, 0, 0.08);
	color: #06182b;
	transition: transform 0.18s ease, background 0.18s ease;
}

.come-top-social-links a:hover,
.come-top-social-links a:focus-visible {
	transform: translateY(-1px);
	background: rgba(0, 0, 0, 0.14);
}

.come-top-social-links svg {
	width: 18px;
	height: 18px;
	display: block;
}

/* --- Site Header (fixed under the download bar) --- */
.come-site-header {
	position: fixed;
	top: var(--come-top-bar-height, 57px);
	left: 0;
	right: 0;
	z-index: 50;
	background: rgba(255, 255, 255, 0.96);
	backdrop-filter: blur(14px);
	border-bottom: 1px solid #d8e3ea;
}

.come-site-header-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	padding: 18px 0;
}

/* --- Brand --- */
.come-brand {
	display: flex;
	align-items: center;
	gap: 14px;
	text-decoration: none;
	flex: 0 0 auto;
}

.come-brand-copy {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

.come-brand-title {
	font-size: 22px;
	font-weight: 800;
	line-height: 1.1;
	letter-spacing: 0.02em;
	color: #06182b;
}

.come-brand-subtitle {
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: #1fd267;
}

/* --- Primary Nav --- */
.come-primary-nav {
	display: flex;
	align-items: center;
	gap: 24px;
	flex: 1 1 auto;
	justify-content: flex-end;
	min-width: 0;
	margin: 0;
	padding: 0;
	list-style: none;
}

.come-primary-nav a {
	text-decoration: none;
	font-size: 15px;
	font-weight: 600;
	color: #3a4a5c;
	white-space: nowrap;
	transition: color 0.2s ease;
}

.come-primary-nav a:hover,
.come-primary-nav a:focus-visible {
	color: #06182b;
}

/* --- Header Actions --- */
.come-header-actions {
	display: flex;
	align-items: center;
	gap: 12px;
	flex: 0 0 auto;
}

/* --- Buttons --- */
.come-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 10px 20px;
	border-radius: 999px;
	border: 1px solid transparent;
	font-size: 14px;
	font-weight: 700;
	text-decoration: none;
	transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
	cursor: pointer;
}

.come-btn:hover {
	transform: translateY(-1px);
}

.come-btn-primary {
	background: #1fd267;
	color: #06182b;
	box-shadow: 0 8px 20px rgba(31, 210, 103, 0.22);
}

.come-btn-primary:hover {
	box-shadow: 0 12px 24px rgba(31, 210, 103, 0.32);
}

.come-btn-secondary {
	background: #06182b;
	color: #ffffff;
	box-shadow: 0 8px 20px rgba(6, 24, 43, 0.18);
}

.come-btn-outline {
	border-color: #d8e3ea;
	background: rgba(255, 255, 255, 0.8);
	color: #06182b;
}

.come-btn-outline:hover,
.come-btn-outline:focus-visible {
	border-color: #1fd267;
	background: rgba(31, 210, 103, 0.06);
}

/* --- Mobile Toggle --- */
.come-mobile-toggle {
	display: none;
	background: none;
	border: none;
	padding: 8px;
	cursor: pointer;
}

/* --- Mobile Panel --- */
.come-mobile-panel {
	position: fixed;
	top: var(--come-mobile-panel-top, 132px);
	left: 0;
	right: 0;
	z-index: 45;
	max-height: calc(100dvh - var(--come-mobile-panel-top, 132px) - 12px);
	overflow: auto;
	-webkit-overflow-scrolling: touch;
	opacity: 0;
	pointer-events: none;
	transform: translateY(-12px);
	transition: opacity 0.22s ease, transform 0.22s ease;
}

.come-mobile-panel-inner {
	padding: 18px;
	border-radius: 16px;
	margin: 0 12px;
	background: rgba(255, 255, 255, 0.98);
	border: 1px solid #d8e3ea;
	box-shadow: 0 24px 42px rgba(0, 0, 0, 0.1);
	backdrop-filter: blur(12px);
}

.come-mobile-nav {
	display: grid;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.come-mobile-nav a {
	display: block;
	padding: 12px 16px;
	border-radius: 12px;
	background: rgba(6, 24, 43, 0.04);
	border: 1px solid rgba(216, 227, 234, 0.6);
	font-size: 15px;
	font-weight: 700;
	text-decoration: none;
	color: #06182b;
	transition: border-color 0.2s ease, background 0.2s ease;
}

.come-mobile-nav a:hover,
.come-mobile-nav a:focus-visible {
	border-color: #1fd267;
	background: rgba(31, 210, 103, 0.06);
}

.come-mobile-panel-actions {
	display: grid;
	grid-template-columns: 1fr;
	gap: 12px;
	margin-top: 16px;
}

body.come-mobile-nav-open .come-mobile-panel {
	opacity: 1;
	pointer-events: auto;
	transform: translateY(0);
}

body.come-mobile-nav-open {
	overflow: hidden;
}

/* --- Responsive --- */
@media (max-width: 768px) {
	.come-primary-nav {
		display: none;
	}

	.come-mobile-toggle {
		display: flex;
		position: relative;
		z-index: 51;
	}

	header.wp-block-template-part {
		padding-top: var(--come-chrome-height, 203px);
	}

	.come-site-header {
		top: var(--come-top-bar-height, 111px);
	}

	.come-top-social-inner {
		flex-wrap: wrap;
	}

	.come-top-social-links span {
		display: none;
	}

	.come-brand-title {
		font-size: 18px;
	}
}

@media (min-width: 769px) {
	.come-mobile-panel {
		display: none !important;
	}
}

/* --- Mobile JS toggle support --- */
.come-mobile-toggle[aria-expanded="true"] .come-toggle-open {
	display: none;
}
.come-mobile-toggle[aria-expanded="true"] .come-toggle-close {
	display: block;
}
.come-mobile-toggle .come-toggle-close {
	display: none;
}

/* --- Official APK spec card --- */
.come-apk-spec {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	gap: 28px;
	align-items: start;
	min-width: 0;
}

.come-apk-spec-list {
	margin: 0;
	padding: 0;
	min-width: 0;
	border: 1px solid rgba(31, 37, 56, 0.12);
	border-radius: 16px;
	background: #fff;
	overflow: hidden;
}

.come-apk-spec-list > div {
	display: grid;
	grid-template-columns: 140px minmax(0, 1fr);
	gap: 12px;
	padding: 12px 16px;
	border-bottom: 1px solid rgba(31, 37, 56, 0.08);
}

.come-apk-spec-list > div:last-child {
	border-bottom: 0;
}

.come-apk-spec-list dt {
	margin: 0;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.02em;
	color: #5b4943;
}

.come-apk-spec-list dd {
	margin: 0;
	font-size: 14px;
	color: #1f2538;
	overflow-wrap: anywhere;
	word-break: break-word;
}

.come-page-hero-copy,
.come-page-hero-copy p,
.come-page-section-head h2,
.come-page-section-head p {
	overflow-wrap: anywhere;
	word-break: break-word;
	max-width: 100%;
}

.come-apk-hash,
.come-apk-hash code {
	display: block;
	max-width: 100%;
	font-family: "Fira Code", ui-monospace, monospace;
	font-size: 12px;
	line-height: 1.5;
	white-space: pre-wrap;
	overflow-wrap: anywhere;
	word-break: break-all;
}

.come-apk-qr {
	margin: 0;
	padding: 16px;
	border: 1px solid rgba(31, 37, 56, 0.12);
	border-radius: 16px;
	background: #fff;
	text-align: center;
	width: 200px;
}

.come-apk-qr img {
	display: block;
	width: 168px;
	height: 168px;
	margin: 0 auto;
}

.come-apk-qr figcaption {
	margin-top: 10px;
	font-size: 13px;
	font-weight: 600;
	color: #5b4943;
}

.come-apk-age {
	margin: 16px 0 0;
	font-size: 14px;
	line-height: 1.6;
	color: #5b4943;
}

@media (max-width: 768px) {
	.come-apk-spec {
		grid-template-columns: 1fr;
	}

	.come-apk-spec-list > div {
		grid-template-columns: 1fr;
		gap: 4px;
	}

	.come-apk-qr {
		width: min(200px, 100%);
		justify-self: start;
	}
}

/* Fantasy Cricket mobile: keep one column after later desktop grid rules */
@media (max-width: 900px) {
	html,
	body {
		overflow-x: hidden;
	}

	main,
	.wp-site-blocks,
	.wp-block-group.alignfull,
	.entry-content.alignfull {
		width: auto !important;
		max-width: 100% !important;
		margin-left: 0 !important;
		margin-right: 0 !important;
		overflow-x: hidden;
	}

	.come-fc-hero-grid,
	.come-fc-overview-grid,
	.come-fc-team-grid,
	.come-fc-step-grid,
	.come-fc-guide-grid,
	.come-fc-value-grid,
	.come-fc-stat-grid,
	.come-fc-mini-points {
		grid-template-columns: 1fr !important;
	}

	.come-fc-hero-card,
	.come-fc-hero-copy,
	.come-fc-hero-visual,
	.come-fc-hero-stage,
	.come-fc-hero-frame {
		min-width: 0;
		max-width: 100%;
	}

	.come-fc-hero-copy,
	.come-fc-hero-copy h1,
	.come-fc-hero-copy p,
	.come-fc-hero-label-row {
		max-width: none !important;
		overflow-wrap: anywhere;
		word-break: break-word;
	}

	.come-fc-hero-note {
		position: static !important;
		max-width: none !important;
	}

	.come-fc-hero-stage {
		display: flex;
		flex-direction: column;
		align-items: stretch;
		gap: 12px;
		min-height: 0 !important;
		padding: 12px 0 0 !important;
	}

	.come-fc-hero-frame {
		max-width: 100%;
		margin: 0 auto;
	}

	.come-fc-hero-card {
		overflow: visible;
		padding-left: 18px;
		padding-right: 18px;
	}

	.come-fc-hero-label-row {
		flex-wrap: wrap;
	}

	.come-fc-hero-actions .come-home-btn {
		min-width: 0;
		width: 100%;
	}

	.come-fc-shell,
	.come-page-shell {
		width: auto !important;
		max-width: 100% !important;
		margin: 0 12px !important;
		padding-left: 0 !important;
		padding-right: 0 !important;
		box-sizing: border-box !important;
	}

	.come-fc-hero-copy h1 {
		font-size: 1.45rem !important;
		line-height: 1.2 !important;
		letter-spacing: 0 !important;
		max-width: 20rem !important;
		text-wrap: wrap !important;
		overflow-wrap: anywhere !important;
		word-break: break-word !important;
	}

	.come-fc-hero-copy,
	.come-fc-hero-copy p,
	.come-fc-panel,
	.come-fc-panel h3,
	.come-page-panel,
	.come-fc-step-card,
	.come-fc-step-top p,
	.come-fc-section-head,
	.come-fc-section-head h2,
	.come-fc-section-head p {
		max-width: 20rem !important;
		overflow-wrap: anywhere;
		word-break: break-word;
	}

	.come-fc-hero-card {
		width: auto !important;
		max-width: 22rem !important;
		box-sizing: border-box !important;
		padding: 24px 14px !important;
	}

	.come-fc-hero-copy p,
	.come-fc-panel p,
	.come-fc-panel li {
		overflow-wrap: anywhere;
		word-break: break-word;
	}

	.come-fc-panel h3,
	.come-fc-team-copy h3,
	.come-fc-guide-card h3,
	.come-fc-value-card h3,
	.come-fc-cta-card h2 {
		overflow-wrap: anywhere;
		word-break: break-word;
	}
}

/* Homepage closing was a full-bleed dark-red slab that read as a mask */
.come-home-closing {
	background: #fff4f2;
	color: #21130f;
	overflow: visible;
}

.come-home-closing-copy,
.come-home-closing-copy h2,
.come-home-closing-copy > p {
	max-width: none;
	overflow-wrap: anywhere;
	word-break: break-word;
}

.come-home-closing-copy h2 {
	color: #1c120e;
}

.come-home-closing-copy > p:not(.come-home-kicker) {
	color: #5f4c45;
}

.come-home-closing-copy .come-home-kicker {
	color: #9f3d28;
	background: #fff;
	border-color: #efd9cf;
}

.come-home-closing-image-frame {
	background: #fff;
	box-shadow: 0 16px 36px rgba(126, 46, 37, 0.1);
}

.come-home-hero-copy,
.come-home-hero-copy h1,
.come-home-hero-copy p,
.come-home-faq-list,
.come-home-section-head {
	min-width: 0;
	max-width: 100%;
	overflow-wrap: anywhere;
	word-break: break-word;
}

.come-home-hero .come-home-shell {
	overflow: hidden;
	box-sizing: border-box;
	max-width: 100%;
}

@media (max-width: 640px) {
	.come-home-hero-copy h1,
	.come-home-closing-copy h2,
	.section-title {
		font-size: clamp(28px, 8vw, 40px);
	}

	.come-home-hero .come-home-shell {
		padding: 16px 14px 28px;
	}

	.come-home-closing-copy,
	.come-home-closing-copy h2,
	.come-home-closing-copy p {
		max-width: 20rem;
	}
}

/* Light footer — inline #1e1a0a read as a black overlay on the cream site */
.come-site-footer,
.come-site-footer.has-background {
	background-color: #fff8f3 !important;
	color: #21130f !important;
	border-top: 1px solid #ead9d0;
}

.come-footer-brand-title {
	color: #111827 !important;
}

.come-site-footer .come-footer-brand-subline {
	color: #0f9d57 !important;
}

.come-site-footer .has-base-color,
.come-site-footer .has-text-color,
.come-site-footer .wp-block-heading,
.come-site-footer p,
.come-site-footer li,
.come-site-footer a,
.come-site-footer .wp-block-navigation-item__content,
.come-site-footer .wp-elements-1 a,
.come-site-footer .wp-elements-2 a {
	color: #21130f !important;
}

.come-site-footer a:hover,
.come-site-footer a:focus-visible {
	color: #0a8f4a !important;
}

.come-site-footer .wp-block-separator,
.come-site-footer .wp-block-separator.has-background,
.come-site-footer .wp-block-separator.has-accent-4-background-color {
	background: #ead9d0 !important;
	border-color: #ead9d0 !important;
	color: #ead9d0 !important;
}

.come-site-footer p,
.come-site-footer li,
.come-site-footer a {
	overflow-wrap: anywhere;
	word-break: break-word;
}

@media (max-width: 900px) {
	.come-site-footer .wp-block-column,
	.come-site-footer p,
	.come-site-footer-meta {
		max-width: 20rem;
	}
}

/* Original editorial copy — keep APK identity on /download-app/, not every URL */
.come-home-editorial {
	max-width: 760px;
	margin: 0 auto 8px;
	text-align: left;
}

.come-home-editorial h2,
.come-home-section-head h2 {
	overflow-wrap: anywhere;
}

.come-home-editorial h2 {
	font-size: clamp(26px, 3.6vw, 40px);
	margin: 0 0 14px;
	color: #21130f;
}

.come-home-editorial p,
.come-page-prose p {
	font-size: 17px;
	line-height: 1.85;
	color: #5d4a44;
	margin: 0 0 14px;
}

.come-home-editorial ul,
.come-page-prose ul {
	margin: 0 0 14px;
	padding-left: 1.2em;
	color: #5d4a44;
	line-height: 1.75;
}

.come-home-editorial a,
.come-page-prose a {
	color: #0a8f4a;
	font-weight: 700;
}

.come-page-prose p {
	font-size: 16px;
}

.come-home-closing .come-home-btn-secondary {
	border-color: #21130f;
	color: #21130f;
	background: #fff;
}

@media (max-width: 900px) {
	.come-home-editorial,
	.come-home-editorial p,
	.come-home-editorial h2,
	.come-home-editorial ul,
	.come-page-prose,
	.come-page-prose p {
		max-width: 20rem;
	}
}

/* Homepage first-screen poster (~4:5). Keep the full frame; do not force the old 9:16 height. */
.come-home-hero,
.come-home-hero-grid,
.come-home-hero-visual,
.come-home-hero-image-frame {
	box-sizing: border-box;
	max-width: 100%;
	min-width: 0;
}

.come-home-hero-image-frame {
	background: #07111d;
	line-height: 0;
	overflow: hidden;
}

.come-home-hero-image {
	display: block;
	width: 100% !important;
	max-width: 100% !important;
	min-width: 0 !important;
	height: auto !important;
	max-height: none !important;
	object-fit: contain !important;
	object-position: center top !important;
	margin-top: 0 !important;
	border-radius: 22px;
}

@media (max-width: 900px) {
	.come-home-hero,
	#top {
		overflow-x: hidden !important;
		max-width: 100% !important;
		padding-left: 10px !important;
		padding-right: 10px !important;
	}

	.come-home-hero .come-home-shell,
	.come-home-hero-grid {
		display: grid !important;
		grid-template-columns: 1fr !important;
		width: 100% !important;
		max-width: 100% !important;
		min-width: 0 !important;
		padding-left: 10px !important;
		padding-right: 10px !important;
		box-sizing: border-box !important;
		gap: 18px !important;
	}

	.come-home-hero-visual,
	.come-home-hero-image-frame,
	.come-home-hero-image {
		width: 100% !important;
		max-width: 20rem !important;
		margin-left: auto !important;
		margin-right: auto !important;
	}

	.come-home-hero-copy,
	.come-home-hero-copy h1,
	.come-home-hero-copy p {
		max-width: 20rem !important;
		overflow-wrap: anywhere !important;
		word-break: break-word !important;
	}
}
