/* ==========================================================================
   Base — Reset + Typography
   --------------------------------------------------------------------------
   A modern CSS reset followed by global typographic styles.  Every element
   inherits the Newsreader font family so bold text never falls back to a
   system sans-serif.
   ========================================================================== */

/* ------------------------------------------------------------------
   1. Box-sizing Reset
   ---------------------------------------------------------------- */

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

/* ------------------------------------------------------------------
   2. Margin / Padding Reset
   ---------------------------------------------------------------- */

html,
body,
h1, h2, h3, h4, h5, h6,
p,
blockquote,
figure,
figcaption,
dl, dd,
ol, ul {
	margin: 0;
	padding: 0;
}

/* ------------------------------------------------------------------
   3. HTML & Body
   ---------------------------------------------------------------- */

html {
	font-size: 16px;
	scroll-behavior: smooth;
	-webkit-text-size-adjust: 100%;
	overflow-x: hidden;
	overflow-x: clip; /* Modern standard — handles vw-based overflow reliably across all browsers */
}

body {
	font-family: var(--font-primary);
	font-weight: var(--fw-regular);
	line-height: 1.7;
	color: var(--color-body-text, var(--color-black));
	background-color: var(--color-body-bg, var(--color-white));
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	overflow-x: hidden;
	overflow-x: clip;
}

/* ------------------------------------------------------------------
   3b. Site Wrapper — prevents horizontal scroll on all mobile browsers
   ----------------------------------------------------------------
   iOS Safari ignores overflow-x:hidden on html/body for vw-based
   overflow.  A wrapper div is the only reliable cross-browser fix.
   ---------------------------------------------------------------- */

.site-wrapper {
	overflow-x: hidden;
	width: 100%;
	position: relative;
}

/* ------------------------------------------------------------------
   3c. WordPress 6.x Layout Overrides
   ----------------------------------------------------------------
   WP core auto-generates .is-layout-constrained and .is-layout-flow
   classes that apply default max-widths to block children.  Since we
   don't use theme.json, override these to let our theme CSS control
   widths on the homepage.
   ---------------------------------------------------------------- */

.homepage .is-layout-constrained > :where(:not(.alignleft):not(.alignright):not(.alignfull)),
.homepage .is-layout-constrained > .alignwide,
.homepage .is-layout-flow > * {
	max-width: none;
}

/* ------------------------------------------------------------------
   3c. Touch Optimization
   ----------------------------------------------------------------
   Eliminates the 300ms tap delay on mobile browsers and improves
   touch responsiveness across all devices.
   ---------------------------------------------------------------- */

a, button, [role="button"], input, select, textarea, label, summary {
	touch-action: manipulation;
}

/* ------------------------------------------------------------------
   4. Headings
   ---------------------------------------------------------------- */

h1, h2, h3, h4, h5, h6 {
	font-family: var(--font-headings, var(--font-primary));
	font-weight: var(--fw-medium);
	line-height: 1.3;
	color: var(--color-black);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.1rem; }
h6 { font-size: 1rem; }

/* ------------------------------------------------------------------
   5. Links — no underlines globally
   ---------------------------------------------------------------- */

a {
	color: inherit;
	text-decoration: none;
	transition: color var(--transition-fast);
}

a:hover,
a:focus-visible {
	color: var(--color-link-hover, var(--color-pink));
}

/* ------------------------------------------------------------------
   6. Bold / Strong — keep Newsreader font family
   ---------------------------------------------------------------- */

strong,
b {
	font-family: var(--font-primary);
	font-weight: var(--fw-bold);
}

/* ------------------------------------------------------------------
   7. Images
   ---------------------------------------------------------------- */

img {
	max-width: 100%;
	height: auto;
	display: block;
}

/* ------------------------------------------------------------------
   8. Lists (restore inside content areas)
   ---------------------------------------------------------------- */

.entry-content ul,
.entry-content ol {
	padding-left: var(--space-md);
}

.entry-content li {
	margin-bottom: var(--space-xs);
}

/* ------------------------------------------------------------------
   9. Misc element resets
   ---------------------------------------------------------------- */

button,
input,
select,
textarea {
	font-family: inherit;
	font-size: inherit;
	line-height: inherit;
	color: inherit;
}

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

table {
	border-collapse: collapse;
	width: 100%;
}

hr {
	border: none;
	border-top: 1px solid var(--color-gray-light);
	margin: var(--space-lg) 0;
}

blockquote {
	border-left: 3px solid var(--color-pink);
	padding-left: var(--space-md);
	font-style: italic;
	color: var(--color-gray-dark);
}

/* ------------------------------------------------------------------
   10. Layout Utilities
   ---------------------------------------------------------------- */

/**
 * Centered container with max-width and horizontal padding.
 */
.container {
	max-width: var(--container-width);
	margin-left: auto;
	margin-right: auto;
	padding-left: var(--space-md);
	padding-right: var(--space-md);
}

/**
 * Narrower content column (for single-post text, etc.).
 */
.content-width {
	max-width: var(--content-width);
}

/* ------------------------------------------------------------------
   11. Accessibility — Screen-reader-only text
   ---------------------------------------------------------------- */

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

.sr-only:focus {
	position: static;
	width: auto;
	height: auto;
	margin: 0;
	overflow: visible;
	clip: auto;
	white-space: normal;
}

/* ------------------------------------------------------------------
   12. Hide Top 10 plugin visit counter
   ---------------------------------------------------------------- */

.tptn_counter {
	display: none;
}
