/* ==========================================================================
   Openwood — Base / Reset / Typography
   ========================================================================== */

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
	margin: 0;
	font-family: var(--ow-font-body);
	font-size: var(--ow-fs-base);
	line-height: var(--ow-lh);
	color: var(--ow-ink);
	background: var(--ow-bg);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	overflow-x: hidden;
}

/* Ambient gradient field behind glass */
body.openwood-theme {
	background-image:
		radial-gradient(60% 50% at 10% 0%, rgba(196, 122, 69, 0.16), transparent 60%),
		radial-gradient(50% 45% at 100% 10%, rgba(138, 90, 54, 0.14), transparent 55%),
		radial-gradient(70% 60% at 50% 110%, rgba(231, 201, 173, 0.30), transparent 60%);
	background-attachment: fixed;
}

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

a { color: var(--ow-accent-2); text-decoration: none; transition: color var(--ow-dur) var(--ow-ease); }
a:hover { color: var(--ow-accent); }

h1, h2, h3, h4, h5 {
	font-family: var(--ow-font-display);
	font-weight: 500;
	line-height: 1.1;
	letter-spacing: -0.01em;
	color: var(--ow-ink);
	margin: 0 0 0.5em;
}

h1 { font-size: clamp(2rem, 4vw + 1rem, 3.6rem); }
h2 { font-size: clamp(1.6rem, 2.4vw + 0.6rem, 2.6rem); }
h3 { font-size: clamp(1.25rem, 1vw + 0.8rem, 1.6rem); }

p { margin: 0 0 1em; }

ul, ol { padding-left: 1.2em; }

hr { border: 0; height: 1px; background: var(--ow-line); margin: var(--ow-space-4) 0; }

blockquote {
	margin: var(--ow-space-4) 0;
	padding: var(--ow-space-3) var(--ow-space-4);
	border-left: 3px solid var(--ow-accent);
	background: var(--ow-glass-bg);
	border-radius: var(--ow-radius-sm);
	font-family: var(--ow-font-display);
	font-style: italic;
}

code, pre {
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	font-size: 0.9em;
}

pre {
	background: rgba(28, 26, 23, 0.9);
	color: #f4efe9;
	padding: var(--ow-space-3);
	border-radius: var(--ow-radius-sm);
	overflow-x: auto;
}

:focus-visible {
	outline: 3px solid var(--ow-accent);
	outline-offset: 3px;
	border-radius: 6px;
}

.screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px; width: 1px;
	margin: -1px; padding: 0;
	overflow: hidden;
	position: absolute !important;
	word-wrap: normal !important;
}

.skip-link {
	position: absolute;
	left: -999px;
	top: 12px;
	z-index: var(--ow-z-toast);
	background: var(--ow-ink);
	color: #fff;
	padding: 10px 18px;
	border-radius: var(--ow-radius-pill);
}
.skip-link:focus { left: 16px; color: #fff; }

.ow-muted { color: var(--ow-ink-soft); }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after {
		animation-duration: 0.001ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.001ms !important;
		scroll-behavior: auto !important;
	}
}

/* Selection */
::selection { background: var(--ow-accent); color: #fff; }
