/**
 * Odio Soft Base Styles
 * Reset, typography, accessibility foundations
 *
 * @package OdioSoft
 */

/* ── Modern reset ── */
*,
*::before,
*::after {
	box-sizing: border-box;
}

* {
	margin: 0;
	padding: 0;
}

html {
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
	scroll-behavior: smooth;
	scroll-padding-top: calc(var(--odio-header-height) + var(--odio-space-4));
}

body {
	min-height: 100vh;
	min-height: 100dvh;
	font-family: var(--odio-font-sans);
	font-size: var(--odio-fs-base);
	font-weight: var(--odio-fw-normal);
	line-height: var(--odio-lh-normal);
	color: var(--odio-text);
	background-color: var(--odio-bg);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	text-rendering: optimizeLegibility;
	overflow-x: clip;
}

img,
picture,
video,
canvas,
svg {
	display: block;
	max-width: 100%;
	height: auto;
}

input,
button,
textarea,
select {
	font: inherit;
	color: inherit;
}

button {
	cursor: pointer;
	background: none;
	border: none;
}

a {
	color: var(--odio-accent);
	text-decoration-thickness: 1px;
	text-underline-offset: 0.15em;
	transition: color var(--odio-transition);
}

a:hover {
	color: var(--odio-accent-hover);
}

ul,
ol {
	list-style: none;
}

table {
	border-collapse: collapse;
	border-spacing: 0;
}

hr {
	border: 0;
	border-top: 1px solid var(--odio-border);
	margin: var(--odio-space-8) 0;
}

/* ── Typography ── */
h1,
h2,
h3,
h4,
h5,
h6 {
	font-weight: var(--odio-fw-semibold);
	line-height: var(--odio-lh-tight);
	letter-spacing: var(--odio-tracking-tight);
	color: var(--odio-text);
}

h1 {
	font-size: var(--odio-fs-4xl);
	margin-bottom: var(--odio-space-6);
}

h2 {
	font-size: var(--odio-fs-3xl);
	margin-bottom: var(--odio-space-5);
}

h3 {
	font-size: var(--odio-fs-2xl);
	margin-bottom: var(--odio-space-4);
}

h4 {
	font-size: var(--odio-fs-xl);
	margin-bottom: var(--odio-space-4);
}

h5 {
	font-size: var(--odio-fs-lg);
	margin-bottom: var(--odio-space-3);
}

h6 {
	font-size: var(--odio-fs-md);
	margin-bottom: var(--odio-space-3);
}

p {
	margin-bottom: var(--odio-space-4);
}

p:last-child {
	margin-bottom: 0;
}

small {
	font-size: var(--odio-fs-sm);
}

strong,
b {
	font-weight: var(--odio-fw-semibold);
}

em,
i {
	font-style: italic;
}

blockquote {
	margin: var(--odio-space-6) 0;
	padding: var(--odio-space-5) var(--odio-space-6);
	border-left: 3px solid var(--odio-accent);
	background: var(--odio-bg-soft);
	border-radius: 0 var(--odio-radius-md) var(--odio-radius-md) 0;
	color: var(--odio-text-muted);
	font-size: var(--odio-fs-md);
	line-height: var(--odio-lh-relaxed);
}

code,
kbd,
pre {
	font-family: var(--odio-font-mono);
	font-size: 0.9em;
}

code {
	padding: 0.15em 0.4em;
	background: var(--odio-bg-soft);
	border-radius: var(--odio-radius-sm);
	color: var(--odio-secondary);
}

pre {
	overflow-x: auto;
	padding: var(--odio-space-4);
	background: var(--odio-primary);
	color: var(--odio-text-on-primary);
	border-radius: var(--odio-radius-md);
	line-height: var(--odio-lh-relaxed);
}

pre code {
	padding: 0;
	background: none;
	color: inherit;
}

/* ── Prose content (WP editor output) ── */
.odio-prose > * + * {
	margin-top: var(--odio-space-4);
}

.odio-prose h2,
.odio-prose h3,
.odio-prose h4 {
	margin-top: var(--odio-space-8);
}

.odio-prose ul,
.odio-prose ol {
	padding-left: var(--odio-space-6);
	margin-bottom: var(--odio-space-4);
}

.odio-prose ul {
	list-style: disc;
}

.odio-prose ol {
	list-style: decimal;
}

.odio-prose li + li {
	margin-top: var(--odio-space-2);
}

.odio-prose a {
	font-weight: var(--odio-fw-medium);
}

.odio-prose table {
	width: 100%;
	border-collapse: collapse;
	font-size: var(--odio-fs-sm, 0.925rem);
}

.odio-prose th,
.odio-prose td {
	border: 1px solid var(--odio-border, #d8dee8);
	padding: var(--odio-space-3) var(--odio-space-4);
	text-align: left;
	vertical-align: top;
}

.odio-prose th {
	background: var(--odio-surface-soft, #f4f7fb);
	font-weight: var(--odio-fw-semibold, 600);
}

/* ── Skip link ── */
.odio-skip-link {
	position: absolute;
	top: -100%;
	left: var(--odio-space-4);
	z-index: var(--odio-z-toast);
	padding: var(--odio-space-3) var(--odio-space-5);
	background: var(--odio-primary);
	color: var(--odio-text-on-primary);
	font-size: var(--odio-fs-sm);
	font-weight: var(--odio-fw-semibold);
	border-radius: var(--odio-radius-md);
	text-decoration: none;
	box-shadow: var(--odio-shadow-md);
	transition: top var(--odio-transition);
}

.odio-skip-link:focus {
	top: var(--odio-space-4);
	outline: none;
}

/* ── Focus visible ── */
:focus {
	outline: none;
}

:focus-visible {
	outline: 2px solid var(--odio-border-focus);
	outline-offset: 2px;
	border-radius: var(--odio-radius-sm);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
	outline: 2px solid var(--odio-border-focus);
	outline-offset: 2px;
}

.odio-btn:focus-visible {
	outline-offset: 3px;
}

/* ── Selection ── */
::selection {
	background: rgba(13, 148, 136, 0.2);
	color: var(--odio-text);
}

.odio-skin-dark ::selection {
	background: rgba(45, 212, 191, 0.25);
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}
}

/* ── Screen reader only ── */
.odio-sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}
