/* Copyright (c) 2026 TurnOnSales.es. All rights reserved.
   Public presentation layer: Route C identity tokens, editorial layouts and
   progressive CSS-only interactions. Business logic belongs to tos-platform. */

:root {
	/* Route C tokens are intentionally independent from the unfinished logo SVG. */
	--bc-ink: #26362e;
	--bc-background: #f6f0e7;
	--bc-compass: #517765;
	--bc-segment: #b6cda7;
	--bc-needle: #c45b3c;
	--tos-radius: .5rem;
	--tos-radius-large: 1rem;
	--tos-border: #d7e2dd;
	--tos-shadow: 0 12px 36px rgb(23 38 43 / .08);
	--tos-shadow-hover: 0 18px 42px rgb(23 38 43 / .14);
	--tos-transition: 180ms ease;
	--tos-header-offset: 5rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; }
img { max-width: 100%; height: auto; }
a { text-underline-offset: .18em; }

/* A high-contrast focus ring makes keyboard navigation visible. */
:where(a, button, input, select, textarea):focus-visible {
	outline: 3px solid var(--wp--preset--color--accent);
	outline-offset: 3px;
}

.wp-site-blocks { min-height: 100vh; display: flex; flex-direction: column; }
.wp-site-blocks > footer { margin-block-start: auto; }
.wp-block-query .wp-block-post { min-width: 0; }
.wp-block-navigation a { text-decoration: none; }
.wp-block-navigation a:hover { text-decoration: underline; text-decoration-thickness: 1px; }

/* The temporary wordmark stays typographic until the approved SVG is production-ready. */
.tos-brand-placeholder .wp-block-site-title__link {
	color: var(--bc-ink);
	font-family: Georgia, 'Times New Roman', serif;
	font-size: clamp(1.2rem, 2vw, 1.55rem);
	font-weight: 700;
	letter-spacing: -.045em;
}

/* Sticky navigation is contextual: it gives orientation without consuming hero space. */
.tos-site-header {
	border-bottom: 1px solid rgb(23 38 43 / .08);
	position: sticky;
	top: 0;
	z-index: 20;
}

.tos-header-inner { min-height: 3.75rem; }
.tos-hero { position: relative; overflow: clip; }
.tos-hero::after {
	background: var(--bc-segment);
	border-radius: 50%;
	content: '';
	height: min(36vw, 25rem);
	opacity: .34;
	position: absolute;
	right: -10rem;
	top: -12rem;
	width: min(36vw, 25rem);
}
.tos-hero > * { position: relative; z-index: 1; }
.tos-eyebrow { font-weight: 700; letter-spacing: .1em; margin-bottom: .5rem; }
.is-style-tos-lead { font-size: clamp(1.15rem, 1.5vw, 1.35rem); color: var(--wp--preset--color--muted); max-width: 46rem; }

/* Editorial cards have a short, reversible hover cue. Content does not move on touch devices. */
.is-style-tos-card {
	background: var(--wp--preset--color--paper);
	border: 1px solid var(--tos-border);
	border-radius: var(--tos-radius-large);
	box-shadow: var(--tos-shadow);
	height: 100%;
	padding: clamp(1rem, 3vw, 2rem);
	transition: box-shadow var(--tos-transition), transform var(--tos-transition), border-color var(--tos-transition);
}
.is-style-tos-card:focus-within,
.is-style-tos-card:hover { border-color: var(--bc-compass); box-shadow: var(--tos-shadow-hover); transform: translateY(-.25rem); }
.wp-block-post-featured-image { margin-bottom: 1rem; overflow: hidden; }
.wp-block-post-featured-image img { border-radius: var(--tos-radius); transition: transform 180ms ease; }
.tos-editorial-card:hover .wp-block-post-featured-image img { transform: scale(1.025); }

/* Answer and data panels make AEO summaries and comparison facts scannable. */
.is-style-tos-answer-box,
.tos-answer-box {
	background: var(--bc-background);
	border-inline-start: .35rem solid var(--bc-needle);
	border-radius: 0 var(--tos-radius) var(--tos-radius) 0;
	padding: clamp(1rem, 3vw, 1.5rem);
}
.is-style-tos-data-panel,
.tos-data-panel {
	background: var(--wp--preset--color--surface);
	border: 1px solid var(--tos-border);
	border-radius: var(--tos-radius-large);
	padding: clamp(1rem, 3vw, 1.5rem);
}

/* Topic links use an underline plus background change; color is never the only cue. */
.tos-topic-link {
	border-bottom: 1px solid var(--tos-border);
	display: block;
	font-weight: 700;
	padding: 1rem 0;
	text-decoration: none;
	transition: background-color var(--tos-transition), padding-inline var(--tos-transition);
}
.tos-topic-link:hover,
.tos-topic-link:focus-visible { background: var(--bc-background); padding-inline: .5rem; }

.tos-offer-label { color: var(--wp--preset--color--offer); font-weight: 700; }
.tos-comparison-table { overflow-x: auto; }
.tos-comparison-table table { border-collapse: collapse; min-width: 38rem; width: 100%; }
.tos-comparison-table :is(th, td) { border-bottom: 1px solid var(--tos-border); padding: .85rem; text-align: left; vertical-align: top; }
.tos-comparison-table th { color: var(--bc-ink); font-weight: 700; }

/* Sticky components become ordinary document flow below desktop to preserve reading space. */
@media (min-width: 960px) {
	.tos-reading-layout { align-items: start; display: grid; gap: clamp(2rem, 5vw, 5rem); grid-template-columns: minmax(10rem, .32fr) minmax(0, 1fr); }
	.tos-reading-tools,
	.tos-comparison-summary { position: sticky; top: calc(var(--tos-header-offset) + 1rem); }
}

/* Reveal hooks are intentionally static. A future optional enhancement may add one
   entry animation (180 ms maximum), but content is always fully visible by default. */
.tos-reveal { opacity: 1; transform: none; }

/* Respect operating-system motion preferences without changing content order. */
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: .01ms !important; }
	.is-style-tos-card:focus-within,
	.is-style-tos-card:hover { transform: none; }
}

@media (hover: none) {
	.is-style-tos-card:focus-within,
	.is-style-tos-card:hover { transform: none; }
	.tos-editorial-card:hover .wp-block-post-featured-image img { transform: none; }
}

@media (max-width: 599px) {
	.tos-hero::after { height: 13rem; right: -7rem; top: -7rem; width: 13rem; }
	.tos-header-inner { gap: .5rem; }
}
