/**
 * MIDHATI — Global design system
 * Single source of truth for tokens, base styles, typography, layout, and components.
 */

/* ==========================================================================
   PART A — CSS custom properties
   ========================================================================== */

:root {
	/* Brand colours */
	--color-navy-header: #1B3A61;
	--color-navy-dark: #0C1F39;
	--color-navy-soft: #1B3A61;
	--color-gold: #C9A32D;
	--color-gold-hover: #b8891f;
	--color-white: #ffffff;
	--color-off-white: #f4f6f9;
	--color-text-dark: #0C1F39;
	--color-text-muted: #6b7280;
	--color-text-light: rgba(255, 255, 255, 0.82);
	--color-border: #e2e8f0;
	--color-gold-border: rgba(201, 163, 45, 0.3);

	/* Typography */
	--font-primary: 'Jost', sans-serif;
	--font-size-xs: 0.75rem;
	--font-size-sm: 0.875rem;
	--font-size-base: 1rem;
	--font-size-lg: 1.125rem;
	--font-size-xl: 1.25rem;
	--font-size-2xl: 1.5rem;
	--font-size-3xl: 2rem;
	--font-size-4xl: 2.5rem;
	--font-size-5xl: 3rem;
	--line-height-body: 1.6;
	--line-height-heading: 1.2;
	--font-weight-regular: 400;
	--font-weight-medium: 500;
	--font-weight-semibold: 600;
	--font-weight-bold: 700;

	/* Spacing scale */
	--space-xs: 0.25rem;
	--space-sm: 0.5rem;
	--space-md: 1rem;
	--space-lg: 1.5rem;
	--space-xl: 2rem;
	--space-2xl: 3rem;
	--space-3xl: 4rem;
	--space-4xl: 6rem;

	/* Layout */
	--container-max: 1200px;
	--container-padding: 1.5rem;
	--border-radius-sm: 4px;
	--border-radius-md: 8px;
	--border-radius-lg: 16px;
	--border-radius-pill: 50px;

	/* Shadows */
	--shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
	--shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
	--shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.16);
	--shadow-header: 0 2px 20px rgba(12, 31, 57, 0.25);

	/* Transitions */
	--transition-fast: 150ms ease;
	--transition-base: 250ms ease;
	--transition-slow: 400ms ease;
}

/* ==========================================================================
   PART B — Base reset and global styles
   ========================================================================== */

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

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

body {
	font-family: var(--font-primary);
	font-size: var(--font-size-base);
	line-height: var(--line-height-body);
	color: var(--color-text-dark);
	background: var(--color-white);
	-webkit-font-smoothing: antialiased;
}

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

a {
	color: var(--color-navy-dark);
	transition: color var(--transition-base);
}

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

ul,
ol {
	list-style: none;
}

/* ==========================================================================
   PART C — Typography scale
   ========================================================================== */

h1,
h2,
h3,
h4,
h5,
h6 {
	font-weight: var(--font-weight-bold);
	line-height: var(--line-height-heading);
	color: var(--color-navy-dark);
}

h1 {
	font-size: clamp(2rem, 5vw, var(--font-size-5xl));
}

h2 {
	font-size: clamp(1.5rem, 3.5vw, var(--font-size-4xl));
}

h3 {
	font-size: clamp(1.25rem, 2.5vw, var(--font-size-3xl));
}

h4 {
	font-size: var(--font-size-2xl);
}

h5 {
	font-size: var(--font-size-xl);
}

h6 {
	font-size: var(--font-size-lg);
}

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

.lead {
	font-size: var(--font-size-lg);
	color: var(--color-text-muted);
}

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

/* ==========================================================================
   PART D — Container
   ========================================================================== */

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

/* ==========================================================================
   PART E — Button system
   ========================================================================== */

.btn {
	display: inline-flex;
	align-items: center;
	gap: var(--space-sm);
	padding: 0.75rem 1.75rem;
	font-family: var(--font-primary);
	font-size: var(--font-size-base);
	font-weight: var(--font-weight-semibold);
	border-radius: var(--border-radius-md);
	border: 2px solid transparent;
	cursor: pointer;
	transition: all var(--transition-base);
	text-decoration: none;
	white-space: nowrap;
	justify-content: center;
}

.btn-primary,
.btn-gold {
	background: var(--color-gold);
	color: var(--color-navy-dark);
	border-color: var(--color-gold);
}

.btn-primary:hover,
.btn-primary:focus-visible,
.btn-gold:hover,
.btn-gold:focus-visible {
	background: var(--color-gold-hover);
	border-color: var(--color-gold-hover);
	transform: translateY(-1px);
	box-shadow: var(--shadow-md);
}

.btn-secondary {
	background: transparent;
	color: var(--color-navy-dark);
	border-color: var(--color-navy-dark);
}

.btn-secondary:hover,
.btn-secondary:focus-visible {
	background: var(--color-navy-dark);
	color: var(--color-white);
}

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

.btn-outline-gold:hover,
.btn-outline-gold:focus-visible {
	background: var(--color-gold);
	color: var(--color-navy-dark);
}

.btn-sm {
	padding: 0.5rem 1.25rem;
	font-size: var(--font-size-sm);
}

.btn-lg {
	padding: 1rem 2.5rem;
	font-size: var(--font-size-lg);
}

/* ==========================================================================
   PART F — Utility classes
   ========================================================================== */

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

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

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

.text-gold {
	color: var(--color-gold);
}

.text-navy {
	color: var(--color-navy-dark);
}

.text-muted {
	color: var(--color-text-muted);
}

.text-white {
	color: var(--color-white);
}

.bg-navy {
	background: var(--color-navy-dark);
	color: var(--color-white);
}

.bg-navy-header {
	background: var(--color-navy-header);
}

.bg-gold {
	background: var(--color-gold);
}

.bg-off-white {
	background: var(--color-off-white);
}

.section-padding {
	padding-block: var(--space-3xl);
}

.section-padding-lg {
	padding-block: var(--space-4xl);
}

.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;
}

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

.skip-link {
	position: absolute;
	top: -100%;
	left: 1rem;
	z-index: 9999;
	padding: 0.75rem 1.5rem;
	background: var(--color-gold);
	color: var(--color-navy-dark);
	font-weight: var(--font-weight-semibold);
	border-radius: var(--border-radius-md);
	text-decoration: none;
	transition: top var(--transition-fast);
}

.skip-link:focus {
	top: 1rem;
}

/* ==========================================================================
   PART G — Card component
   ========================================================================== */

.card {
	background: var(--color-white);
	border-radius: var(--border-radius-lg);
	box-shadow: var(--shadow-sm);
	padding: var(--space-xl);
	border: 1px solid var(--color-border);
	transition: box-shadow var(--transition-base), transform var(--transition-base);
}

.card:hover {
	box-shadow: var(--shadow-md);
	transform: translateY(-2px);
}

.card-icon {
	width: 56px;
	height: 56px;
	background: rgba(201, 163, 45, 0.1);
	border-radius: var(--border-radius-md);
	display: flex;
	align-items: center;
	justify-content: center;
	margin-bottom: var(--space-md);
	color: var(--color-gold);
	font-size: var(--font-size-2xl);
}

/* ==========================================================================
   PART H — Section label (gold dot pattern)
   ========================================================================== */

.section-label {
	display: inline-flex;
	align-items: center;
	gap: var(--space-sm);
	font-size: var(--font-size-sm);
	font-weight: var(--font-weight-semibold);
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--color-gold);
	margin-bottom: var(--space-md);
}

.section-label::before {
	content: '';
	width: 8px;
	height: 8px;
	background: var(--color-gold);
	border-radius: 50%;
	flex-shrink: 0;
}

/* ==========================================================================
   Accessibility — 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;
	}
}
