/*
Theme Name:  Pure-OX Theme
Theme URI:   https://pureox.in
Author:      PURE-OX Industrial Systems Private Limited
Author URI:  https://pureox.in
Description: A premium industrial engineering corporate theme for PURE-OX (Industrial Systems Private Limited). Built for Elementor & Elementor Pro with full WordPress VIP compatibility, optimised Core Web Vitals, and a clean corporate design system.
Version:     1.2.0
Requires at least: 6.4
Tested up to: 6.7
Requires PHP: 8.1
License:     GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: pure-ox-theme
Tags:        industrial, corporate, elementor, business, portfolio, custom-logo, custom-menu, responsive-layout, translation-ready
*/

/* =============================================================================
   CSS CUSTOM PROPERTIES — DESIGN TOKENS
   ============================================================================= */

:root {
	/* Brand Colors */
	--color-primary:        #0a1f43;
	--color-accent:         #00B4D8;
	--color-accent-dark:    #0096b3;
	--color-accent-light:   #daf4fb;
	--color-red:            #DC2B1C;
	--color-red-dark:       #b8220f;
	--color-red-light:      #fdf0ee;
	--color-bg-light:       #f0f4f8;
	--color-bg-dark:        #0d1929;
	--color-white:          #ffffff;

	/* Text — navy-blue tinted scale (not generic grays) */
	--color-heading:        #1d232e;
	--color-text:           #1d232e;
	--color-text-muted:     #3b5070;
	--color-text-light:     #5c7499;
	--color-text-on-dark:   rgba(255, 255, 255, 0.88);
	--color-text-on-dark-2: rgba(255, 255, 255, 0.68);

	/* Borders */
	--color-border:         rgba(10, 31, 67, 0.1);
	--color-border-medium:  rgba(10, 31, 67, 0.2);
	--color-border-subtle:  rgba(10, 31, 67, 0.06);

	/* Surface */
	--color-surface:        #ffffff;
	--color-surface-raised: #f8fbff;

	/* Typography */
	--font-primary:         'Space Grotesk', system-ui, -apple-system, sans-serif;
	--font-quote:           Georgia, 'Times New Roman', serif;
	--font-weight-light:    300;
	--font-weight-regular:  400;
	--font-weight-medium:   500;
	--font-weight-semibold: 600;
	--font-weight-bold:     700;

	/* Font Sizes */
	--fs-h1:      clamp(44px, 6vw, 72px);
	--fs-h2:      clamp(34px, 4vw, 52px);
	--fs-h3:      clamp(24px, 2.8vw, 34px);
	--fs-h4:      clamp(20px, 2vw, 26px);
	--fs-h5:      clamp(18px, 1.6vw, 22px);
	--fs-body-lg: 20px;
	--fs-body:    17px;
	--fs-sm:      15px;
	--fs-xs:      13px;
	--fs-label:   12px;

	/* Line Heights */
	--lh-heading: 1.15;
	--lh-body:    1.7;
	--lh-tight:   1.1;

	/* Spacing */
	--section-py:    100px;
	--section-py-sm: 48px;
	--container-max: 1600px;
	--container-px:  100px;
	--card-p:        40px;
	--card-p-sm:     24px;
	--gap-lg:        48px;
	--gap-md:        32px;
	--gap-sm:        24px;
	--gap-xs:        16px;

	/* Border Radius */
	--radius-xs:   4px;
	--radius-sm:   8px;
	--radius-md:   12px;
	--radius-lg:   16px;
	--radius-xl:   20px;
	--radius-pill: 9999px;

	/* Overlay — opacity variants of primary (CSS can't do rgba(var()) without color-mix) */
	--color-primary-90: rgba(10, 31, 67, 0.9);   /* gallery/image gradient overlays */

	/* Shadows */
	--shadow-card:   0 20px 60px rgba(0, 0, 0, 0.08);
	--shadow-sm:     0 4px 16px rgba(0, 0, 0, 0.06);
	--shadow-lg:     0 32px 80px rgba(0, 0, 0, 0.12);
	--shadow-accent: 0 8px 32px rgba(0, 180, 216, 0.3);
	--shadow-red:    0 8px 32px rgba(220, 43, 28, 0.3);

	/* Transitions */
	--transition-fast:   0.15s ease;
	--transition-base:   0.25s ease;
	--transition-slow:   0.4s ease;
	--transition-spring: 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);

	/* Z-index Scale */
	--z-base:    1;
	--z-raised:  10;
	--z-dropdown:100;
	--z-sticky:  200;
	--z-overlay: 300;
	--z-modal:   400;
	--z-toast:   500;

	/* Header */
	--header-height: 80px;
}

/* =============================================================================
   RESET & BASE
   ============================================================================= */

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

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

body {
	font-family: var(--font-primary);
	font-size: var(--fs-body);
	font-weight: var(--font-weight-regular);
	line-height: var(--lh-body);
	color: var(--color-text);
	background-color: var(--color-white);
	-webkit-font-smoothing: subpixel-antialiased;
	-moz-osx-font-smoothing: auto;
	text-rendering: optimizeSpeed;
}

/* Skip link for accessibility */
.skip-link {
	position: absolute;
	left: -9999px;
	top: auto;
	width: 1px;
	height: 1px;
	overflow: hidden;
	z-index: var(--z-toast);
}

.skip-link:focus {
	position: fixed;
	top: 0;
	left: 0;
	width: auto;
	height: auto;
	padding: 12px 24px;
	background: var(--color-accent);
	color: var(--color-white);
	font-weight: var(--font-weight-bold);
	text-decoration: none;
	border-radius: 0 0 var(--radius-sm) 0;
	outline: none;
}

/* =============================================================================
   TYPOGRAPHY
   ============================================================================= */

h1, h2, h3, h4, h5, h6 {
	font-family: var(--font-primary);
	font-weight: var(--font-weight-bold);
	line-height: var(--lh-heading);
	color: var(--color-primary);
	letter-spacing: -0.01em;
}

h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }
h4 { font-size: var(--fs-h4); font-weight: var(--font-weight-semibold); }
h5 { font-size: var(--fs-h5); font-weight: var(--font-weight-semibold); }
h6 { font-size: var(--fs-body); font-weight: var(--font-weight-semibold); }

p {
	margin-bottom: 1.25em;
	color: var(--color-text-muted);
}

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

a {
	color: var(--color-accent);
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 2px;
	transition: color var(--transition-fast);
}

a:hover,
a:focus {
	color: var(--color-accent-dark);
	text-decoration-thickness: 2px;
}

strong, b { font-weight: var(--font-weight-bold); }
em, i     { font-style: italic; }

ul, ol {
	padding-left: 1.5em;
	margin-bottom: 1.25em;
}

li { margin-bottom: 0.5em; }

blockquote {
	border-left: 4px solid var(--color-accent);
	padding: 16px 24px;
	margin: 2em 0;
	background: var(--color-bg-light);
	border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

blockquote p {
	font-size: var(--fs-body-lg);
	font-style: italic;
	color: var(--color-primary);
}

code, pre {
	font-family: 'Courier New', Courier, monospace;
	font-size: 0.875em;
	background: var(--color-bg-light);
	border-radius: var(--radius-xs);
}

code { padding: 2px 6px; }

pre {
	padding: 20px;
	overflow-x: auto;
	margin-bottom: 1.5em;
}

hr {
	border: none;
	border-top: 1px solid var(--color-border);
	margin: 2em 0;
}

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

table {
	width: 100%;
	border-collapse: collapse;
	margin-bottom: 1.5em;
}

th, td {
	padding: 12px 16px;
	text-align: left;
	border-bottom: 1px solid var(--color-border);
}

th {
	background: var(--color-bg-light);
	font-weight: var(--font-weight-semibold);
	color: var(--color-primary);
}

/* =============================================================================
   LAYOUT UTILITIES
   ============================================================================= */

.container {
	max-width: var(--container-max);
	margin-inline: auto;
	padding-inline: var(--container-px);
	width: 100%;
	box-sizing: border-box;
}

.container--narrow  { max-width: 1024px; }
.container--wide    { max-width: 1800px; }

.section {
	padding-block: var(--section-py);
}

.section--sm {
	padding-block: 64px;
}

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--gap-md); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap-md); }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--gap-md); }

.flex         { display: flex; }
.flex-center  { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-col     { display: flex; flex-direction: column; }

.text-center  { text-align: center; }
.text-left    { text-align: left; }
.text-right   { text-align: right; }

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

/* =============================================================================
   COMPONENT CLASSES (design system utilities)
   ============================================================================= */

/* Buttons */
.btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 14px 32px;
	font-family: var(--font-primary);
	font-size: var(--fs-body);
	font-weight: var(--font-weight-bold);
	line-height: 1;
	border-radius: var(--radius-sm);
	border: 2px solid transparent;
	cursor: pointer;
	text-decoration: none;
	transition: background-color var(--transition-base), color var(--transition-base), border-color var(--transition-base), transform var(--transition-base), box-shadow var(--transition-base);
	white-space: nowrap;
}

.btn:hover,
.btn:focus-visible {
	transform: translateY(-2px);
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
	text-decoration: none;
}

.btn:active { transform: translateY(0); }

.btn-primary {
	background-color: var(--color-accent);
	color: var(--color-white);
	border-color: var(--color-accent);
}

.btn-primary:hover,
.btn-primary:focus-visible {
	background-color: var(--color-accent-dark);
	border-color: var(--color-accent-dark);
	color: var(--color-white);
}

.btn-outline {
	background-color: transparent;
	color: var(--color-white);
	border-color: var(--color-white);
}

.btn-outline:hover,
.btn-outline:focus-visible {
	background-color: var(--color-white);
	color: var(--color-primary);
}

.btn-dark {
	background-color: var(--color-primary);
	color: var(--color-white);
	border-color: var(--color-primary);
}

.btn-dark:hover,
.btn-dark:focus-visible {
	background-color: #0d2a5a;
	border-color: #0d2a5a;
	color: var(--color-white);
}

.btn-ghost {
	background-color: transparent;
	color: var(--color-primary);
	border-color: var(--color-border-medium);
}

.btn-ghost:hover {
	background-color: var(--color-bg-light);
}

/* ── Global BEM button variants (used by PSA, PEB, and utility pages) ── */
.btn--primary {
	background-color: var(--color-red);
	color: var(--color-white);
	border-color: var(--color-red);
}

.btn--primary:hover,
.btn--primary:focus-visible {
	background-color: var(--color-red-dark);
	border-color: var(--color-red-dark);
	color: var(--color-white);
	text-decoration: none;
}

/* Light-bg outline: dark border + dark text */
.btn--outline {
	background-color: transparent;
	color: var(--color-primary);
	border-color: var(--color-border-medium);
}

.btn--outline:hover,
.btn--outline:focus-visible {
	background-color: var(--color-primary);
	border-color: var(--color-primary);
	color: var(--color-white);
	text-decoration: none;
}

/* Dark-bg outline: pair with .text-white on dark hero/navy sections */
.btn--outline.text-white {
	color: var(--color-white);
	border-color: rgba(255, 255, 255, 0.45);
}

.btn--outline.text-white:hover,
.btn--outline.text-white:focus-visible {
	background-color: var(--color-white);
	border-color: var(--color-white);
	color: var(--color-primary);
}

.btn--sm {
	padding: 10px 20px;
	font-size: var(--fs-sm);
}

.btn--lg {
	padding: 18px 40px;
	font-size: var(--fs-body-lg);
}

/* Section headings */
.section-heading {
	margin-bottom: 48px;
}

.section-heading.text-center {
	max-width: 720px;
	margin-inline: auto;
}

.section-title {
	font-size: var(--fs-h2);
	font-weight: var(--font-weight-bold);
	color: var(--color-primary);
	margin-bottom: 16px;
}

.section-title--light { color: var(--color-white); }

.section-divider {
	display: block;
	height: 6px;
	width: 96px;
	background: var(--color-accent);
	border-radius: var(--radius-pill);
	margin-top: 16px;
}

.section-heading.text-center .section-divider {
	margin-inline: auto;
}

.section-subtitle {
	font-size: var(--fs-body-lg);
	color: var(--color-text-muted);
	line-height: var(--lh-body);
	margin-top: 20px;
}

.section-subtitle--light { color: rgba(255, 255, 255, 0.8); }

/* Tag / Badge */
.tag-badge {
	display: inline-block;
	font-size: 11px;
	font-weight: var(--font-weight-bold);
	letter-spacing: 0.2em;
	text-transform: uppercase;
	padding: 6px 16px;
	background-color: var(--color-accent);
	color: var(--color-white);
	border-radius: var(--radius-pill);
	line-height: 1;
}

.tag-badge--outline {
	background-color: transparent;
	border: 2px solid var(--color-accent);
	color: var(--color-accent);
}

.tag-badge--dark {
	background-color: var(--color-primary);
}

/* Cards */
.card-white {
	background: var(--color-white);
	border-radius: var(--radius-lg);
	box-shadow: var(--shadow-card);
	overflow: hidden;
	transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.card-white:hover {
	transform: translateY(-4px);
	box-shadow: var(--shadow-lg);
}

/* Background utilities */
.bg-primary  { background-color: var(--color-primary); }
.bg-dark     { background-color: var(--color-bg-dark); }
.bg-light    { background-color: var(--color-bg-light); }
.bg-accent   { background-color: var(--color-accent); }
.bg-white    { background-color: var(--color-white); }

/* Text utilities */
.text-primary    { color: var(--color-primary); }
.text-cyan       { color: var(--color-accent); }
.text-muted      { color: var(--color-text-muted); }
.text-white      { color: var(--color-white); }
.text-light      { color: rgba(255, 255, 255, 0.8); }

/* Blueprint / dot overlay */
.blueprint-overlay {
	position: relative;
}

.blueprint-overlay::before {
	content: '';
	position: absolute;
	inset: 0;
	background-image: radial-gradient(var(--color-primary) 0.5px, transparent 0.5px);
	background-size: 20px 20px;
	opacity: 0.05;
	pointer-events: none;
	z-index: 0;
}

.blueprint-overlay > * { position: relative; z-index: 1; }

/* Hover lift */
.hover-lift {
	transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.hover-lift:hover {
	transform: translateY(-4px);
	box-shadow: var(--shadow-lg);
}

/* Icon cyan */
.icon-cyan {
	color: var(--color-accent);
	font-size: 36px;
	line-height: 1;
}

/* Gradient text */
.gradient-text {
	background: linear-gradient(135deg, var(--color-accent) 0%, #0077a8 100%);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	background-clip: text;
}

/* =============================================================================
   FORMS
   ============================================================================= */

.form-field {
	margin-bottom: 20px;
}

.form-label {
	display: block;
	font-size: var(--fs-sm);
	font-weight: var(--font-weight-semibold);
	color: var(--color-primary);
	margin-bottom: 6px;
}

.form-input,
.form-textarea,
.form-select {
	width: 100%;
	padding: 12px 16px;
	font-family: var(--font-primary);
	font-size: var(--fs-body);
	color: var(--color-text);
	background: var(--color-white);
	border: 1.5px solid var(--color-border-medium);
	border-radius: var(--radius-sm);
	outline: none;
	transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
	border-color: var(--color-accent);
	box-shadow: 0 0 0 3px rgba(0, 180, 216, 0.15);
}

.form-textarea { resize: vertical; min-height: 140px; }

/* =============================================================================
   PAGINATION
   ============================================================================= */

.pagination {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	margin-top: 64px;
}

.pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	border-radius: var(--radius-sm);
	font-size: var(--fs-sm);
	font-weight: var(--font-weight-semibold);
	color: var(--color-text-muted);
	background: var(--color-white);
	border: 1.5px solid var(--color-border);
	text-decoration: none;
	transition: all var(--transition-fast);
}

.pagination .page-numbers:hover,
.pagination .page-numbers.current {
	background: var(--color-accent);
	border-color: var(--color-accent);
	color: var(--color-white);
}

/* =============================================================================
   ACCESSIBILITY — WCAG 2.1 AA
   ============================================================================= */

/* Focus-visible: 3px offset, strong contrast, never invisible */
:focus-visible {
	outline: 3px solid var(--color-accent);
	outline-offset: 3px;
	border-radius: 2px;
}

/* Buttons and interactive elements — stronger ring so focus is never hidden
   by background colours (e.g. dark sections) */
.btn:focus-visible,
.tag-badge:focus-visible,
[role="button"]:focus-visible {
	outline: 3px solid var(--color-accent);
	outline-offset: 4px;
	box-shadow: 0 0 0 6px rgba(0, 180, 216, 0.25);
}

/* Dark-background sections need a light outline */
.bg-primary :focus-visible,
.bg-dark :focus-visible,
[class*="hero"] :focus-visible {
	outline-color: var(--color-white);
	box-shadow: 0 0 0 2px var(--color-accent);
}

/* Skip-to-content link — visible only on keyboard focus */
.skip-link {
	position: absolute;
	top: -60px;
	left: 16px;
	z-index: 9999;
	padding: 12px 24px;
	background: var(--color-accent);
	color: var(--color-white);
	font-weight: var(--font-weight-bold);
	border-radius: 0 0 var(--radius-sm) var(--radius-sm);
	text-decoration: none;
	transition: top 0.2s ease;
}

.skip-link:focus {
	top: 0;
	outline: 3px solid var(--color-primary);
	outline-offset: 0;
}

/* aria-disabled visual affordance */
[aria-disabled="true"],
[disabled] {
	opacity: 0.5;
	cursor: not-allowed;
	pointer-events: none;
}

/* Live region announcements */
[aria-live] { speak: always; }

/* Breadcrumb separator — not meaningful to screen readers */
.breadcrumb__sep { color: var(--color-text-light); margin-inline: 6px; }

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

/* High contrast / forced-colours mode */
@media (forced-colors: active) {
	.btn { forced-color-adjust: none; }
	:focus-visible { outline: 3px solid ButtonText; }
}

/* =============================================================================
   WORDPRESS CORE CLASSES
   ============================================================================= */

.alignleft  { float: left; margin: 0 24px 16px 0; }
.alignright { float: right; margin: 0 0 16px 24px; }
.aligncenter {
	display: block;
	margin-inline: auto;
	margin-bottom: 16px;
}

.alignfull  { width: 100vw; margin-left: calc(-50vw + 50%); }
.alignwide  { max-width: 1440px; margin-inline: auto; }

.wp-caption { max-width: 100%; }
.wp-caption-text {
	font-size: var(--fs-xs);
	color: var(--color-text-light);
	text-align: center;
	padding: 8px 0;
}

.gallery-caption { font-size: var(--fs-xs); color: var(--color-text-light); }

.sticky    { /* WordPress sticky post class — styled in archive */ }
.bypostauthor { /* Author post highlight */ }

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

/* =============================================================================
   PRINT STYLES
   ============================================================================= */

@media print {
	.site-header,
	.site-footer,
	.no-print { display: none !important; }

	body { font-size: 12pt; color: #000; background: #fff; }
	a    { color: #000; text-decoration: underline; }
	h1, h2, h3 { page-break-after: avoid; }
	img { max-width: 100% !important; }
}
