/*
 * OneHundred compatibility layer for the approved Streamova system.
 * Content and editorial layout remain owned by the child theme; this file maps
 * those surfaces onto the production design tokens and chrome.
 */

:root {
	--oh-blue: rgb(var(--sr-accent));
	--oh-blue-dark: var(--streamova-accent);
	--oh-ink: var(--sv-ink);
	--oh-muted: var(--sv-muted);
	--oh-line: var(--sv-line);
	--oh-surface: #fafaf8;
	--oh-surface-muted: rgb(var(--sr-surface));
	--oh-bg: var(--sv-paper);
}

body.wp-child-theme-onehundred.streamova-site {
	background: var(--sv-paper) !important;
	color: var(--sv-ink);
	font-family: var(--sv-font);
	overflow-x: hidden;
}

body.wp-child-theme-onehundred .sv-site-shell {
	width: 100%;
	max-width: var(--sr-container);
}

body:not(.home) .sv-header {
	height: 148px;
	background: #111216;
	border-radius: 40px 40px 0 0;
}

.sv-navigation .oh-section-nav__list {
	display: flex;
	align-items: center;
	gap: 4px;
	list-style: none;
	margin: 0;
	padding: 0;
}

body.wp-child-theme-onehundred .sv-navigation {
	width: min(1180px, calc(100% - 24px));
}

body.wp-child-theme-onehundred .sv-navigation nav a {
	padding-inline: 7px;
	color: #aeb0b6 !important;
	font-size: 12.5px;
}

body.wp-child-theme-onehundred .sv-navigation nav a:hover,
body.wp-child-theme-onehundred .sv-navigation nav a:focus-visible,
body.wp-child-theme-onehundred .sv-navigation nav .current-menu-item > a,
body.wp-child-theme-onehundred .sv-navigation nav [aria-current="page"] { color: var(--streamova-accent) !important; }

.sv-footer-grid a:hover,
.sv-footer-grid a:focus-visible,
.sv-footer-bottom a:hover,
.sv-footer-bottom a:focus-visible { color: var(--streamova-accent) !important; }

.sr-mobile-menu a:hover,
.sr-mobile-menu a:focus-visible,
.sr-mobile-menu .current-menu-item > a,
.sr-mobile-menu [aria-current="page"] { color: var(--streamova-accent) !important; }

.sv-brand {
	display: inline-flex;
	align-items: center;
	gap: 3px;
	color: #f7f7f4;
	font-size: 18px;
	font-weight: 750;
	letter-spacing: -.04em;
	white-space: nowrap;
}

.sv-brand :is(.oh-brand__image, .oh-brand__image--adaptive) {
	display: block;
	width: 112px;
	max-height: 40px;
	object-fit: contain;
	object-position: left center;
}

.sv-brand span { font-weight: 450; }
.sv-brand small { color: #aeb0b6; font-size: 10px; letter-spacing: .05em; }

.sv-header-theme {
	display: grid;
	place-items: center;
	flex: 0 0 36px;
	width: 36px;
	height: 36px;
	min-width: 36px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: #fff;
}

.sv-header-theme:hover { background: #ffffff12; }
.sv-menu-toggle,
.sv-menu-toggle .sv-icon { color: #fff !important; }
.sv-menu-toggle .sv-icon { display: block; width: 20px; height: 20px; }
.sv-header-theme .oh-theme-toggle__icon { font-size: 17px; line-height: 1; }

.oh-sr-ticker {
	position: absolute;
	top: 118px;
	left: 50%;
	z-index: 2;
	display: flex;
	align-items: center;
	gap: 18px;
	width: min(900px, calc(100% - 48px));
	padding: 8px 16px;
	transform: translateX(-50%);
	overflow: hidden;
	border: 1px solid #ffffff12;
	border-radius: 999px;
	background: rgba(17, 18, 22, .7);
	color: #aeb0b6;
	backdrop-filter: blur(18px);
	font-size: 11px;
}

.home .oh-sr-ticker { top: 114px; }
.oh-sr-ticker strong { flex: none; color: #d4af37; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }
.oh-sr-ticker > div { display: flex; min-width: 0; gap: 28px; overflow: hidden; white-space: nowrap; }
.oh-sr-ticker a { color: #d6d7da; text-overflow: ellipsis; overflow: hidden; }

/* Homepage hero: production geometry with local publication content. */
.oh-sr-hero { margin: 0; }
.oh-sr-hero .cinematic-title { font-size: clamp(3.6rem, 4.55vw, 5rem); }
.oh-sr-hero .cinematic-title > span { max-width: 100%; }
.oh-sr-hero .cinematic-title > span:not(.soft-line) { color: #f7f7f6 !important; }
.oh-sr-hero .cinematic-title > span:last-child {
	white-space: normal;
	font-size: .62em;
	line-height: 1.04;
	letter-spacing: -.055em;
	margin-top: .12em;
}
.oh-sr-hero :is(.sv-hero-subtitle, .sv-hero-description, .cinematic-feature) { color: #a7a9b0 !important; }
.oh-sr-hero .media-card { color: #fff; }
.oh-sr-hero .media-card-title {
	display: -webkit-box;
	overflow: hidden;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	line-height: 1.2;
}
.oh-sr-hero .media-card-kicker {
	max-width: calc(100% - 54px);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.oh-sr-hero .sv-hero-art:not(.is-visible) .media-card { animation-play-state: paused; }
.oh-sr-hero .sv-hero-art.is-visible .media-card { animation-play-state: running; }

/* Existing homepage modules use the approved card and section language. */
.home .oh-home-editorial,
.home .oh-home-body,
.home .oh-home-page-content {
	width: calc(100% - 96px);
	max-width: 1250px;
	margin-inline: auto;
}

.home :is(.oh-news-home, .oh-home-discovery, .oh-more-stories, .oh-section-block, .oh-home-promise, .oh-topic-directory) {
	margin-top: 64px;
}

.home :is(.oh-news-home__heading, .oh-module-heading h2, .oh-section-block__heading h2) {
	font-family: var(--sv-font);
	font-weight: 560;
	letter-spacing: -.05em;
}

.home :is(.oh-primary-story, .oh-support-story, .oh-top-headlines, .oh-more-stories, .oh-section-block, .oh-home-promise, .oh-panel, .oh-topic-directory, .oh-home-discovery) {
	border-color: #ffffff;
	border-radius: var(--sr-radius-card);
	background: #fafaf8;
	box-shadow: var(--sr-shadow-soft);
}

.home :is(.oh-primary-story__media, .oh-support-story__media, .oh-card__media, .oh-topic-card__media, .oh-section-lead__media) img {
	border-radius: 18px;
}

.home :is(.oh-news-kicker, .oh-kicker, .oh-category-label) { color: var(--sv-coral); }
.home :is(.oh-button, .oh-all-news) { border-radius: 999px; }

/* Standard pages, archives, search and 404 retain their templates and gain the new surfaces. */
body:not(.home) .oh-main {
	min-height: 45vh;
	background: var(--sv-paper);
}

body:not(.home) :is(.oh-page, .oh-archive-head, .oh-search-head, .oh-error, .oh-category-shell) {
	margin-top: 0;
}

body:not(.home) :is(.oh-page__header, .oh-archive-head, .oh-search-head, .oh-error, .oh-category-header) {
	padding-top: clamp(44px, 6vw, 84px);
}

body:not(.home) :is(.oh-page__header, .oh-archive-head, .oh-search-head, .oh-error) h1 {
	font-family: var(--sv-font);
	font-weight: 600;
	letter-spacing: -.055em;
}

body:not(.home) :is(.oh-page-section, .oh-resource-card, .oh-card, .oh-panel, .oh-list > article, .oh-category-row, .oh-category-lead, .oh-category-support, .oh-search-filter-panel) {
	border-color: #ffffff;
	border-radius: var(--sr-radius-card);
	background: #fafaf8;
	box-shadow: var(--sr-shadow-soft);
}

body:not(.home) :is(.oh-kicker, .oh-category-label, .oh-article__section, .oh-related__category) { color: var(--sv-coral); }
body:not(.home) :is(.oh-button, .wp-block-button__link, input[type="submit"], .page-numbers) { border-radius: 999px; }

/* Articles keep their complete reading architecture. */
.single-post .oh-main { background: var(--sv-paper); }
.single-post .oh-article--network { padding-top: clamp(44px, 6vw, 76px); }
.single-post .oh-article--network .oh-article__header > h1 {
	font-family: var(--sv-font);
	font-weight: 620;
	letter-spacing: -.055em;
}
.single-post .oh-article--network .oh-article__standfirst { color: #666970; }
.single-post .oh-article--network .oh-article__featured img {
	border-radius: 28px;
	box-shadow: 0 28px 70px -42px #1119;
}
.single-post :is(.oh-article__identity, .oh-article-author, .oh-related-panel, .oh-comments, .post-navigation) {
	border-color: #ffffff;
	border-radius: var(--sr-radius-card);
	background: #fafaf8;
	box-shadow: var(--sr-shadow-soft);
}
.single-post .oh-article__identity { padding: 18px 22px; }
.single-post .oh-prose { font-family: var(--sv-editorial); }
.single-post .oh-prose :is(h2, h3, h4) { font-family: var(--sv-font); letter-spacing: -.035em; }
.single-post .oh-share a { border-radius: 50%; }

/* Footer keeps local widgets/forms while matching the approved production shell. */
.sv-footer .dgp-cta-section { padding-bottom: 64px; }
.sv-footer .dgp-cta-section > .container { width: 100%; max-width: 768px; margin-inline: auto; }
.sv-footer .dgp-cta-banner { padding: 0; text-align: center; background: none; color: var(--sv-ink); }
.sv-footer .dgp-cta-banner h2 { font: 600 clamp(36px, 5vw, 60px)/1.05 var(--sv-font); letter-spacing: -.045em; }
.sv-footer .dgp-cta-banner p { max-width: 672px; margin: 24px auto 0; color: #686a70; font-size: 18px; }
.sv-footer .sv-actions { justify-content: center; margin-top: 40px; }
.sv-footer .sv-footer-about .oh-brand__image { width: 135px; max-height: 48px; object-fit: contain; object-position: left center; }
.sv-footer .sv-footer-about > a:first-child { color: #232427; font-size: 20px; font-weight: 750; letter-spacing: -.04em; }
.sv-footer .sv-footer-menu { display: flex; flex-wrap: wrap; gap: 12px 20px; list-style: none; margin: 0; padding: 0; }
.sv-footer .sv-footer-menu li { margin: 0; padding: 0; }
.sv-footer .oh-footer-widgets { max-width: 1024px; margin: 0 auto 32px; }
.sv-footer .oh-newsletter__privacy { margin-top: 12px; font-size: 11px; }
.sv-footer .oh-newsletter__privacy a { color: #d4af37; text-decoration: underline; text-underline-offset: 2px; }

html[data-oh-theme="dark"] body.streamova-site { --sv-paper: #151619; --sv-ink: #f1f1ef; --sv-muted: #b0b2b8; --sv-line: #ffffff1c; }
html[data-oh-theme="dark"] body:not(.home) .oh-main { background: var(--sv-paper); }
html[data-oh-theme="dark"] body :is(.oh-page-section, .oh-resource-card, .oh-card, .oh-panel, .oh-list > article, .oh-category-row, .oh-category-lead, .oh-category-support, .oh-search-filter-panel, .oh-article__identity, .oh-article-author, .oh-related-panel, .oh-comments, .post-navigation) {
	border-color: #ffffff12;
	background: #202125;
}
html[data-oh-theme="dark"] body.home :is(.oh-primary-story, .oh-support-story, .oh-top-headlines, .oh-more-stories, .oh-section-block, .oh-home-section, .oh-home-promise, .oh-panel, .oh-topic-directory, .oh-home-discovery) {
	border-color: #ffffff12;
	background: #202125;
	color: #f1f1ef;
}
html[data-oh-theme="dark"] body.home :is(.oh-primary-story, .oh-support-story, .oh-top-headlines, .oh-more-stories, .oh-section-block, .oh-home-section, .oh-home-promise, .oh-panel, .oh-topic-directory, .oh-home-discovery) :is(h2, h3, a:not(.oh-news-kicker)) { color: #f1f1ef !important; }
html[data-oh-theme="dark"] body.home :is(.oh-primary-story, .oh-support-story, .oh-top-headlines, .oh-more-stories, .oh-section-block, .oh-home-section, .oh-home-promise, .oh-panel, .oh-topic-directory, .oh-home-discovery) :is(p, .oh-news-meta) { color: #b7b9bf !important; }
html[data-oh-theme="dark"] body.home :is(.oh-news-kicker, .oh-kicker, .oh-category-label) { color: #d4af37 !important; }

@media (max-width: 1023px) {
	body.wp-child-theme-onehundred .sv-navigation { width: min(940px, calc(100% - 24px)); }
	.sv-navigation .oh-section-nav__list { display: block; }
	.sv-header-theme { order: 2; }
	.sv-search-link { order: 3; }
	.sv-header-cta { order: 4; }
	.sv-menu-toggle { order: 5; }
	.oh-sr-ticker { top: 108px; }
	.home .oh-sr-ticker { top: 106px; }
}

@media (max-width: 767px) {
	body:not(.home) .sv-header { height: 126px; border-radius: 28px 28px 0 0; }
	.home .oh-home-editorial,
	.home .oh-home-body,
	.home .oh-home-page-content { width: calc(100% - 32px); }
	.home :is(.oh-news-home, .oh-home-discovery, .oh-more-stories, .oh-section-block, .oh-home-promise, .oh-topic-directory) { margin-top: 40px; }
	.oh-sr-ticker { display: none; }
	.oh-sr-hero .cinematic-title > span:last-child { font-size: .55em; }
	.oh-sr-hero .cinematic-title { font-size: clamp(1.7rem, 8vw, 2.3rem); }
	/* Preserve the cinematic composition without continuous GPU work on
	 * phones. Desktop keeps the full floating animation system. */
	.oh-sr-hero .media-card { animation: none !important; backdrop-filter: none; -webkit-backdrop-filter: none; will-change: auto; }
	.oh-sr-hero .media-card-1 { transform: rotate(-5deg); }
	.oh-sr-hero .media-card-2 { transform: rotate(4deg); }
	.oh-sr-hero .media-card-3 { transform: rotate(-3deg); }
	.oh-sr-hero .media-card-4 { transform: rotate(2deg); }
	.oh-sr-hero .media-card-5 { transform: rotate(5deg); }
	.oh-sr-hero .media-card-6 { transform: rotate(-4deg); }
	.oh-sr-hero :is(.hero-ray, .hero-haze) { filter: none; }
	body.wp-child-theme-onehundred .sv-navigation { backdrop-filter: none; -webkit-backdrop-filter: none; }
	.single-post .oh-article__identity { padding: 16px; }
	.sv-footer .dgp-cta-banner h2 { font-size: 36px; line-height: 1.2; }
}

@media (max-width: 390px) {
	.sv-header-theme { display: none; }
	.sv-navigation { gap: 4px; }
	.oh-sr-hero .cinematic-title { font-size: clamp(1.75rem, 9vw, 2.6rem); }
}
