/**
 * Global base styles (Vantage Journeys)
 *
 * Reset, typography defaults, layout utilities. Uses semantic tokens from design-system.css.
 *
 * @package Vantage_Journeys
 */

/* ==========================================================================
   Reset
   --------------------------------------------------------------------------
   Purpose: Border-box and media defaults for the whole site.
   ========================================================================== */

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	scroll-behavior: smooth;
}

body {
	margin: 0;
	min-height: 100vh;
	background: var(--color-bg);
	color: var(--color-text-primary);
	font: var(--type-body-md);
	font-family: var(--font-body);
	-webkit-font-smoothing: antialiased;
}

img,
svg,
video {
	display: block;
	max-width: 100%;
	height: auto;
}

/* ==========================================================================
   Layout utilities
   --------------------------------------------------------------------------
   Purpose: Shared page width wrapper (used in header, main, footer templates).
   ========================================================================== */

.container {
	width: 100%;
	max-width: var(--container-xl);
	margin-inline: auto;
	padding-inline: var(--container-gutter);
}

/* ==========================================================================
   Links and focus
   --------------------------------------------------------------------------
   Purpose: Default anchor styling and keyboard focus rings.
   ========================================================================== */

a {
	color: var(--color-brand-primary);
	text-decoration-thickness: 1px;
	text-underline-offset: 0.15em;
}

a:hover {
	color: var(--color-brand-primary-hover);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
	outline: 2px solid var(--color-brand-secondary);
	outline-offset: 2px;
}

/* ==========================================================================
   Typography — headings and prose
   --------------------------------------------------------------------------
   Purpose: Element-level type scale; components may extend with BEM blocks.
   ========================================================================== */

h1,
.h1 {
	font: var(--type-h1);
	font-family: var(--font-family-primary);
	font-weight: var(--font-weight-bold);
	letter-spacing: var(--ls-tight);
	color: var(--color-primary-700);
}

h2,
.h2 {
	font: var(--type-h2);
	font-family: var(--font-family-primary);
	font-weight: var(--font-weight-bold);
	letter-spacing: var(--ls-tight);
	color: var(--color-primary-700);
}

h3,
.h3 {
	font: var(--type-h3);
	font-family: var(--font-family-primary);
	font-weight: var(--font-weight-semibold);
	color: var(--color-primary-700);
}

h4,
.h4 {
	font: var(--type-h4);
	font-family: var(--font-family-primary);
	font-weight: var(--font-weight-semibold);
}

h5,
.h5 {
	font: var(--type-h5);
	font-family: var(--font-body);
	font-weight: var(--font-weight-semibold);
}

h6,
.h6 {
	font: var(--type-h6);
	font-family: var(--font-body);
	font-weight: var(--font-weight-semibold);
}

/* Accent script — special words inside headings (wrap with .text-accent) */
.text-accent,
.heading-accent,
h1 .text-accent,
h2 .text-accent,
h3 .text-accent,
h4 .text-accent,
h5 .text-accent,
h6 .text-accent,
.h1 .text-accent,
.h2 .text-accent,
.h3 .text-accent,
.h4 .text-accent,
.h5 .text-accent,
.h6 .text-accent {
	font-family: var(--font-family-accent);
	font-weight: 400;
	font-style: normal;
	letter-spacing: 0.02em;
}

p {
	margin: 0 0 var(--space-stack-md);
}

ul,
ol {
	margin: 0 0 var(--space-stack-md);
	padding-left: 1.25em;
}

/* ==========================================================================
   Accessibility
   --------------------------------------------------------------------------
   Purpose: Screen reader text and skip link (WordPress requirement).
   ========================================================================== */

.screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	width: 1px;
	word-wrap: normal !important;
}

.screen-reader-text:focus {
	background-color: var(--color-bg);
	clip: auto !important;
	clip-path: none;
	color: var(--color-text-primary);
	display: block;
	font-size: var(--font-size-sm);
	height: auto;
	left: var(--space-4);
	line-height: normal;
	padding: var(--padding-sm);
	top: var(--space-4);
	width: auto;
	z-index: var(--z-toast, 100000);
}

.skip-link {
	position: absolute;
	left: -9999px;
	top: var(--space-4);
	z-index: var(--z-toast, 100000);
	padding: var(--padding-sm) var(--padding-md);
	background: var(--color-surface);
	color: var(--color-text-primary);
	font: var(--type-label-md);
	text-decoration: none;
	border-radius: var(--radius-md);
	box-shadow: var(--shadow-md);
}

.skip-link:focus {
	left: var(--space-4);
	outline: 2px solid var(--color-brand-secondary);
	outline-offset: 2px;
}

/* ==========================================================================
   WordPress block / classic editor alignment
   --------------------------------------------------------------------------
   Purpose: Core alignment classes from block editor and classic content.
   ========================================================================== */

.alignleft {
	float: left;
	margin: 0 var(--space-md) var(--space-md) 0;
}

.alignright {
	float: right;
	margin: 0 0 var(--space-md) var(--space-md);
}

.aligncenter {
	display: block;
	margin-inline: auto;
}

.alignwide,
.alignfull {
	width: 100%;
	max-width: none;
}

.wp-caption {
	max-width: 100%;
}

.wp-caption-text {
	margin-top: var(--space-xs);
	font: var(--type-caption);
	color: var(--color-text-secondary);
}

/* ==========================================================================
   Motion utilities (GSAP targets)
   --------------------------------------------------------------------------
   Purpose: will-change hints for parallax; respect reduced motion in components.
   ========================================================================== */

@media (prefers-reduced-motion: no-preference) {
	.hero__bg,
	[data-parallax],
	.process__bg-number {
		will-change: transform;
	}
}

.hero__words {
	display: inline;
}

.hero__words span {
	display: inline-block;
}

/* ==========================================================================
   Rich Text content styling (.vj-rich-text / .entry-content)
   ========================================================================== */
.vj-rich-text,
.entry-content {
	line-height: var(--lh-relaxed, 1.65);
	font-family: var(--font-body, 'DM Sans', sans-serif);
	color: var(--color-text-secondary);
}

.vj-rich-text p,
.entry-content p {
	margin-block-start: 0;
	margin-block-end: var(--space-md, 1.5rem);
}

.vj-rich-text p:last-child,
.entry-content p:last-child {
	margin-block-end: 0;
}

/* Headings inside Rich Text */
.vj-rich-text h1, .entry-content h1,
.vj-rich-text h2, .entry-content h2,
.vj-rich-text h3, .entry-content h3,
.vj-rich-text h4, .entry-content h4,
.vj-rich-text h5, .entry-content h5,
.vj-rich-text h6, .entry-content h6 {
	font-family: var(--font-family-primary, 'Poppins', sans-serif);
	color: var(--color-primary-700);
	margin-block-start: 1.6em;
	margin-block-end: 0.6em;
	line-height: var(--lh-tight, 1.25);
	font-weight: 700;
}

.vj-rich-text h1, .entry-content h1 { font-size: var(--fs-3xl); }
.vj-rich-text h2, .entry-content h2 { font-size: var(--fs-2xl); }
.vj-rich-text h3, .entry-content h3 { font-size: var(--fs-xl); }
.vj-rich-text h4, .entry-content h4 { font-size: var(--fs-lg); }
.vj-rich-text h5, .entry-content h5 { font-size: var(--fs-md); }
.vj-rich-text h6, .entry-content h6 { font-size: var(--fs-sm); }

.vj-rich-text h1:first-child, .entry-content h1:first-child,
.vj-rich-text h2:first-child, .entry-content h2:first-child,
.vj-rich-text h3:first-child, .entry-content h3:first-child,
.vj-rich-text h4:first-child, .entry-content h4:first-child,
.vj-rich-text h5:first-child, .entry-content h5:first-child,
.vj-rich-text h6:first-child, .entry-content h6:first-child {
	margin-block-start: 0;
}

/* Custom Unordered Lists (ul) */
.vj-rich-text ul,
.entry-content ul {
	list-style: none;
	padding-inline-start: 0;
	margin-block-start: 0;
	margin-block-end: var(--space-md, 1.5rem);
}

.vj-rich-text ul li,
.entry-content ul li {
	position: relative;
	padding-inline-start: 1.75rem;
	margin-block-end: var(--space-xs, 0.75rem);
	line-height: var(--lh-normal, 1.5);
}

.vj-rich-text ul li::before,
.entry-content ul li::before {
	content: "";
	position: absolute;
	left: 0.25rem;
	top: 0.55em;
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background-color: var(--color-brand-secondary, #f68737);
	box-shadow: 0 0 0 2px var(--color-secondary-100);
}

/* Custom Ordered Lists (ol) */
.vj-rich-text ol,
.entry-content ol {
	list-style: none;
	counter-reset: vj-ol-counter;
	padding-inline-start: 0;
	margin-block-start: 0;
	margin-block-end: var(--space-md, 1.5rem);
}

.vj-rich-text ol li,
.entry-content ol li {
	position: relative;
	counter-increment: vj-ol-counter;
	padding-inline-start: 2rem;
	margin-block-end: var(--space-xs, 0.75rem);
	line-height: var(--lh-normal, 1.5);
}

.vj-rich-text ol li::before,
.entry-content ol li::before {
	content: counter(vj-ol-counter);
	position: absolute;
	left: 0;
	top: 0.15em;
	width: 1.45rem;
	height: 1.45rem;
	background-color: var(--color-neutral-100);
	color: var(--color-brand-primary, #194fa2);
	font-family: var(--font-primary, 'Poppins', sans-serif);
	font-size: var(--fs-xs, 12px);
	font-weight: 700;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
}

/* Nested Lists */
.vj-rich-text ul ul,
.entry-content ul ul,
.vj-rich-text ol ul,
.entry-content ol ul,
.vj-rich-text ul ol,
.entry-content ul ol,
.vj-rich-text ol ol,
.entry-content ol ol {
	margin-block-start: var(--space-xs, 0.75rem);
	margin-block-end: 0;
	padding-inline-start: 1rem;
}

.vj-rich-text ul ul li::before,
.entry-content ul ul li::before {
	background-color: var(--color-brand-primary);
	box-shadow: 0 0 0 2px var(--color-primary-50);
}
