/**
 * Homepage Launch Edition — v17.0.0
 * Refinement only. Same sections, tokens, and brand language.
 */

:root {
	--header-h: 80px;
	--header-h-scrolled: 60px;
	--control-h: 48px;
}

/* --------------------------------------------------------------------------
   Header — sticky shrink
   -------------------------------------------------------------------------- */

.site-header {
	height: var(--header-h);
	min-height: var(--header-h);
	transition: height 200ms ease, min-height 200ms ease, background 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
}

.site-header__bar {
	height: var(--header-h);
	min-height: var(--header-h);
	max-height: var(--header-h);
	gap: 1.25rem;
	transition: height 200ms ease, min-height 200ms ease, max-height 200ms ease;
}

.site-header.is-scrolled {
	height: var(--header-h-scrolled);
	min-height: var(--header-h-scrolled);
}

.site-header.is-scrolled .site-header__bar {
	height: var(--header-h-scrolled);
	min-height: var(--header-h-scrolled);
	max-height: var(--header-h-scrolled);
}

.site-header.is-scrolled .site-branding__logo {
	height: 28px;
}

.site-nav__menu {
	gap: 0.35rem 1.35rem;
}

.site-nav__menu > li > a {
	padding: 0.4rem 0.15rem;
	min-height: 44px;
	display: inline-flex;
	align-items: center;
}

.header-search,
.header-cta,
.menu-toggle,
.header-search-toggle {
	height: var(--control-h);
	min-height: var(--control-h);
}

.header-search__input,
.header-cta {
	height: var(--control-h);
	min-height: var(--control-h);
	box-sizing: border-box;
}

.header-search__input {
	width: min(18rem, 32vw);
	padding: 0 0.9rem;
	font-size: 0.875rem;
}

.header-search-toggle {
	display: none;
	align-items: center;
	justify-content: center;
	width: 48px;
	min-width: 48px;
	border: 1px solid var(--border);
	border-radius: var(--radius);
	background: var(--surface);
	color: var(--text);
	text-decoration: none;
}

.header-search-toggle:focus-visible,
.header-cta:focus-visible,
.menu-toggle:focus-visible,
.site-nav__menu a:focus-visible,
.hero__search-input:focus-visible,
.btn:focus-visible,
.explore-tile:focus-visible,
.trend-card:focus-visible,
.intel-feed__row:focus-visible,
.platform-summary__card:focus-visible,
.industry-pill:focus-visible,
.country-dense-list a:focus-visible {
	outline: none;
	box-shadow: var(--focus-ring);
}

/* --------------------------------------------------------------------------
   Hero — hierarchy + primary search
   -------------------------------------------------------------------------- */

.home .hero {
	padding-top: 1.75rem;
	padding-bottom: 2.5rem;
}

.home .hero__grid {
	align-items: stretch;
	gap: 2.5rem;
}

.home .hero__title {
	margin: 0 0 1rem;
	letter-spacing: -0.025em;
}

.home .hero__lead {
	max-width: 36rem;
	margin: 0 0 1.5rem;
	font-size: 1.0625rem;
	line-height: 1.55;
	color: var(--text-secondary);
}

.home .hero__search {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	width: 100%;
	max-width: 34rem;
	margin: 0 0 1.25rem;
	padding: 0.35rem 0.85rem;
	min-height: 56px;
	border: 1px solid var(--border-strong, var(--border));
	border-radius: var(--radius);
	background: var(--surface);
	box-shadow: var(--shadow-soft);
	transition: border-color 180ms ease, box-shadow 180ms ease;
}

.home .hero__search:focus-within {
	border-color: var(--blue);
	box-shadow: var(--focus-ring);
}

.home .hero__search-icon {
	display: inline-flex;
	color: var(--text-muted);
	flex-shrink: 0;
}

.home .hero__search-input {
	flex: 1;
	min-width: 0;
	height: 48px;
	border: 0;
	background: transparent;
	font-size: 1rem;
	color: var(--text);
}

.home .hero__search-input:focus {
	outline: none;
}

.home .hero__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	margin: 0;
}

.home .hero__actions .btn {
	min-height: 48px;
}

.home .hero__panel {
	display: flex;
}

.home .hero__panel .intel-panel {
	width: 100%;
	height: 100%;
	display: flex;
	flex-direction: column;
}

/* --------------------------------------------------------------------------
   Intelligence panel
   -------------------------------------------------------------------------- */

.home .intel-panel__header {
	padding: 1rem 1.15rem;
}

.home .intel-panel__tabs {
	display: flex;
	gap: 0.25rem;
	padding: 0.5rem 0.65rem;
	overflow-x: auto;
	scrollbar-width: thin;
}

.home .intel-panel__tab {
	flex: 0 0 auto;
	min-height: 44px;
	padding: 0.45rem 0.7rem;
	white-space: nowrap;
	border-radius: 8px;
	transition: background 160ms ease, color 160ms ease;
}

.home .intel-row {
	display: grid;
	grid-template-columns: auto 1fr auto;
	align-items: center;
	gap: 0.75rem;
	min-height: 64px;
	padding: 0.7rem 1.1rem;
	transition: background 160ms ease;
}

.home .intel-row:hover {
	background: var(--hover);
}

.home .intel-row__title {
	display: block;
	font-weight: 600;
	line-height: 1.3;
}

.home .intel-row__meta,
.home .intel-row__time {
	font-size: 0.8125rem;
	color: var(--text-muted);
}

.home .intel-row__time {
	justify-self: end;
	text-align: right;
	white-space: nowrap;
}

/* --------------------------------------------------------------------------
   Platform summary
   -------------------------------------------------------------------------- */

.home .platform-summary {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
	gap: 0.85rem;
}

.home .platform-summary > li {
	list-style: none;
	margin: 0;
	min-width: 0;
	display: flex;
}

.home .platform-summary__card {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	align-items: flex-start;
	gap: 0.35rem;
	width: 100%;
	height: 100%;
	min-width: 0;
	min-height: 108px;
	padding: 1.1rem 1.15rem;
	border: 1px solid var(--border);
	border-radius: var(--radius-lg);
	background: var(--surface);
	text-decoration: none;
	color: var(--text);
	box-shadow: var(--shadow-soft);
	transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.home .platform-summary__card:hover {
	border-color: var(--border-strong, var(--divider));
	box-shadow: var(--shadow-lift);
	transform: translateY(-1px);
}

.home .platform-summary__icon {
	display: inline-flex;
	color: var(--blue);
}

.home .platform-summary__count {
	font-family: var(--font-serif);
	font-size: 1.75rem;
	font-weight: 600;
	line-height: 1.1;
	letter-spacing: -0.02em;
}

.home .platform-summary__label {
	font-size: 0.875rem;
	color: var(--text-secondary);
}

/* --------------------------------------------------------------------------
   Editorial picks / explore / trending / feed
   -------------------------------------------------------------------------- */

.home .picks-grid--three {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 1.5rem;
	align-items: stretch;
}

.home .picks-grid--three > * {
	height: 100%;
}

.home .picks-grid--three .card,
.home .picks-grid--three .card__link {
	height: 100%;
}

.home .picks-grid--three .card__title {
	font-size: 1.375rem;
	line-height: 1.3;
}

.home .explore-tiles {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 1rem;
}

.home .explore-tile {
	display: grid;
	grid-template-columns: auto 1fr auto;
	grid-template-areas:
		"icon label arrow"
		"icon summary arrow"
		"icon count arrow";
	gap: 0.2rem 0.85rem;
	align-items: start;
	min-height: 124px;
	padding: 1.15rem 1.2rem;
	border: 1px solid var(--border);
	border-radius: var(--radius-lg);
	background: var(--surface);
	text-decoration: none;
	color: var(--text);
	box-shadow: var(--shadow-soft);
	transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.home .explore-tile:hover {
	border-color: var(--blue);
	box-shadow: var(--shadow-lift);
	transform: translateY(-1px);
}

.home .explore-tile__icon { grid-area: icon; color: var(--blue); }
.home .explore-tile__label { grid-area: label; }
.home .explore-tile__summary { grid-area: summary; color: var(--text-secondary); font-size: 0.875rem; }
.home .explore-tile__count { grid-area: count; font-size: 0.8125rem; color: var(--text-muted); }
.home .explore-tile__arrow { grid-area: arrow; align-self: center; color: var(--text-muted); }

.home .section--trending .product-subhead {
	margin: 1.75rem 0 0.85rem;
}

.home .section--trending .product-subhead:first-of-type {
	margin-top: 0.25rem;
}

.home .trend-rail {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
	gap: 0.85rem;
}

.home .trend-card {
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
	min-height: 148px;
	padding: 1rem 1.05rem;
	border: 1px solid var(--border);
	border-radius: var(--radius-lg);
	background: var(--surface);
	text-decoration: none;
	color: var(--text);
	transition: border-color 160ms ease, box-shadow 160ms ease;
}

.home .trend-card:hover {
	border-color: var(--border-strong, var(--divider));
	box-shadow: var(--shadow-soft);
}

.home .trend-card__name {
	font-size: 1rem;
	line-height: 1.3;
}

.home .trend-card__meta,
.home .trend-card__time {
	font-size: 0.8125rem;
	color: var(--text-muted);
}

.home .intel-feed--dense {
	list-style: none;
	margin: 0;
	padding: 0;
	border: 1px solid var(--border);
	border-radius: var(--radius-lg);
	overflow: hidden;
	background: var(--surface);
}

.home .intel-feed > li {
	list-style: none;
	margin: 0;
}

.home .intel-feed__row {
	display: grid;
	grid-template-columns: auto 1fr auto auto;
	align-items: center;
	gap: 0.85rem;
	min-height: 68px;
	padding: 0.85rem 1.15rem;
	border-bottom: 1px solid var(--border);
	text-decoration: none;
	color: var(--text);
	transition: background 160ms ease;
}

.home .intel-feed > li:last-child .intel-feed__row {
	border-bottom: 0;
}

.home .intel-feed__row:hover {
	background: var(--hover);
}

.home .intel-feed__title {
	display: block;
	line-height: 1.35;
}

.home .intel-feed__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 0.45rem 0.65rem;
	align-items: center;
	margin-top: 0.2rem;
	font-size: 0.8125rem;
	color: var(--text-muted);
}

.home .intel-feed__time {
	font-size: 0.8125rem;
	color: var(--text-muted);
	white-space: nowrap;
}

/* --------------------------------------------------------------------------
   Industries + countries
   -------------------------------------------------------------------------- */

.home .industry-pills {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 0.55rem;
}

.home .industry-pills > li {
	list-style: none;
	margin: 0;
	min-width: 0;
}

.home .industry-pill {
	display: inline-flex;
	align-items: center;
	gap: 0.55rem;
	min-height: 44px;
	padding: 0.45rem 0.85rem;
	border: 1px solid var(--border);
	border-radius: 999px;
	background: var(--surface);
	text-decoration: none;
	color: var(--text);
	max-width: 100%;
}

.home .industry-pill__name {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.home .country-dense-list {
	list-style: none;
	margin: 0;
	padding: 0;
	border: 1px solid var(--border);
	border-radius: var(--radius-lg);
	overflow: hidden;
	background: var(--surface);
}

.home .country-dense-list a {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	min-height: 52px;
	padding: 0.85rem 1.15rem;
	border-bottom: 1px solid var(--border);
	text-decoration: none;
	color: var(--text);
	font-weight: 500;
}

.home .country-dense-list li:last-child a {
	border-bottom: 0;
}

.home .country-dense-list a:hover {
	background: var(--hover);
}

.home .country-dense-list__count {
	font-variant-numeric: tabular-nums;
	color: var(--text-muted);
	font-weight: 600;
}

/* --------------------------------------------------------------------------
   Section rhythm
   -------------------------------------------------------------------------- */

.home .section {
	padding-top: clamp(3rem, 5vw, 5.5rem);
	padding-bottom: clamp(3rem, 5vw, 5.5rem);
}

.home .section-header {
	margin-bottom: 1.75rem;
}

.home .section-title {
	margin: 0 0 0.55rem;
}

.home .section-lead {
	margin: 0;
	max-width: 40rem;
}

.home .section--platform-summary {
	padding-top: clamp(2.25rem, 4vw, 3.5rem);
}

/* --------------------------------------------------------------------------
   Footer polish + mobile accordion
   -------------------------------------------------------------------------- */

.site-footer__grid--hub {
	gap: 1.75rem 1.5rem;
}

@media (min-width: 1024px) {
	.site-footer__grid--hub {
		display: grid;
		grid-template-columns: minmax(12rem, 1.25fr) repeat(5, minmax(0, 1fr));
		align-items: start;
		column-gap: 1.5rem;
		row-gap: 1.75rem;
	}

	.footer-col--brand {
		display: block;
	}
}

.site-footer .footer-col--brief .newsletter-form {
	width: 100%;
}

.site-footer .footer-col--brief .newsletter-form input[type="email"],
.site-footer .footer-col--brief .newsletter-form .btn {
	min-height: 48px;
}

.footer-col--accordion > .footer-heading,
.footer-col--accordion > summary.footer-heading {
	cursor: default;
	list-style: none;
}

.footer-col--accordion > summary.footer-heading::-webkit-details-marker {
	display: none;
}

@media (min-width: 1024px) {
	.footer-col--accordion {
		display: block;
	}

	.footer-col--accordion > *:not(summary) {
		display: block !important;
	}

	.footer-col--accordion > ul,
	.footer-col--accordion .footer-links,
	.footer-col--accordion .footer-social,
	.footer-col--accordion .footer-brief-text {
		display: block !important;
	}

	.footer-col--accordion > summary.footer-heading {
		pointer-events: none;
		cursor: default;
	}
}

@media (max-width: 1023px) {
	.footer-col--accordion {
		border-top: 1px solid rgba(255, 255, 255, 0.08);
		padding-top: 0.35rem;
	}

	.footer-col--accordion > summary.footer-heading {
		display: flex;
		align-items: center;
		justify-content: space-between;
		min-height: 48px;
		cursor: pointer;
		pointer-events: auto;
	}

	.footer-col--accordion > summary.footer-heading::after {
		content: "+";
		font-size: 1.125rem;
		opacity: 0.7;
	}

	.footer-col--accordion[open] > summary.footer-heading::after {
		content: "–";
	}

	.site-footer .footer-col--brief {
		order: 2;
	}

	.site-footer .footer-col--brief .newsletter-form,
	.site-footer .footer-col--brief .newsletter-form .btn,
	.site-footer .footer-col--brief .newsletter-form input[type="email"] {
		width: 100%;
	}
}

/* Force open footer details on desktop via polyfill-class from JS not needed:
   details without open still hide content — use open attribute by default on desktop via JS. */

/* --------------------------------------------------------------------------
   Mobile
   -------------------------------------------------------------------------- */

@media (max-width: 1100px) {
	.home .picks-grid--three {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 1023px) {
	.header-search {
		display: none;
	}

	.header-search-toggle {
		display: inline-flex;
	}

	.header-cta {
		display: none;
	}

	.home .hero__grid {
		grid-template-columns: 1fr;
		gap: 1.75rem;
	}

	/* 2-col grid on tablet/mobile. Flex+scroll previously targeted
	   .platform-summary__card, but a11y markup made li the flex item —
	   cards overlapped. Keep grid so li wrappers size correctly. */
	.home .platform-summary {
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 0.75rem;
		overflow: visible;
		padding-bottom: 0;
		scroll-snap-type: none;
	}

	.home .platform-summary__card {
		flex: 1 1 auto;
		width: 100%;
		height: 100%;
		min-width: 0;
	}

	.home .trend-rail {
		display: flex;
		overflow-x: auto;
		gap: 0.75rem;
		padding-bottom: 0.25rem;
		scroll-snap-type: x proximity;
	}

	.home .trend-card {
		flex: 0 0 min(78vw, 240px);
		scroll-snap-align: start;
	}

	.home .intel-feed__row {
		grid-template-columns: auto 1fr;
		grid-template-areas:
			"icon main"
			"icon time";
	}

	.home .intel-feed__icon { grid-area: icon; }
	.home .intel-feed__main { grid-area: main; }
	.home .intel-feed__time { grid-area: time; justify-self: start; }
	.home .intel-feed__arrow { display: none; }

	.home .country-dense-list {
		border: 0;
		background: transparent;
		display: grid;
		gap: 0.65rem;
	}

	.home .country-dense-list li a {
		border: 1px solid var(--border);
		border-radius: var(--radius);
		background: var(--surface);
		min-height: 56px;
	}

	.home .hero__actions .btn,
	.home .hero__actions .btn--secondary {
		width: 100%;
		justify-content: center;
	}
}

@media (max-width: 479px) {
	:root {
		--header-h: 64px;
		--header-h-scrolled: 56px;
	}

	.home .hero__title {
		font-size: clamp(1.75rem, 8vw, 2.15rem);
	}

	.home .hero__search {
		min-height: 52px;
	}

	.home .industry-pill {
		max-width: 100%;
	}
}

@media (min-width: 1024px) {
	.home .hero__grid {
		grid-template-columns: 1.15fr 0.85fr;
		gap: 3rem;
		align-items: stretch;
	}
}

@media (prefers-reduced-motion: reduce) {
	.site-header,
	.site-header__bar,
	.home .platform-summary__card,
	.home .explore-tile,
	.home .trend-card,
	.home .intel-row,
	.home .intel-feed__row {
		transition: none !important;
		transform: none !important;
	}
}
