/* ==========================================================================
   GLOBAL.CSS — The Law Offices of Jimmy Cha, APC.
   Design tokens, reset, and base typography. Loaded on every page.
   Visual system per the wireframe: premium litigation, courtroom authority.
   ========================================================================== */

:root {
	/* Surfaces */
	--ink: #0E0E11;            /* primary background */
	--charcoal: #181820;       /* cards, nav, footer */
	--slate: #22222C;          /* elevated surfaces, hover */
	--gunmetal: #2D2D38;       /* dividers, borders */

	/* Accents */
	--crimson: #A6182C;        /* CTAs, urgency, accent */
	--crimson-light: #C82844;
	--crimson-dim: rgba(166, 24, 44, 0.15);
	--gold: #B8945E;           /* honors / awards only */
	--gold-light: #D4B896;
	--gold-dim: rgba(184, 148, 94, 0.15);

	/* Text */
	--warm-white: #F5F5F0;     /* headlines */
	--silver-light: #C8C8D0;   /* body text on dark */
	--silver: #A8A8B0;
	--gray-300: #65656E;       /* muted / meta */

	/* Fonts */
	--font-display: 'Cormorant Garamond', Georgia, serif;
	--font-body: 'Source Sans 3', system-ui, -apple-system, sans-serif;
	--font-mono: 'Roboto Mono', ui-monospace, monospace;

	/* Gradients */
	--grad-crimson: linear-gradient(135deg, #C82844 0%, #A6182C 100%);
	--grad-gold: linear-gradient(135deg, #D4B896 0%, #B8945E 100%);
	--grad-surface: linear-gradient(160deg, #1C1C26 0%, #141419 100%);
	--grad-line: linear-gradient(90deg, var(--crimson), transparent);

	/* Shadows */
	--shadow-sm: 0 4px 14px rgba(0, 0, 0, 0.35);
	--shadow-md: 0 14px 34px rgba(0, 0, 0, 0.5);
	--shadow-lg: 0 26px 60px rgba(0, 0, 0, 0.6);
	--glow-crimson: 0 0 0 1px rgba(166, 24, 44, 0.5), 0 18px 40px rgba(166, 24, 44, 0.22);
	--glow-gold: 0 0 0 1px rgba(184, 148, 94, 0.45), 0 18px 40px rgba(184, 148, 94, 0.16);

	/* Layout */
	--container: 1440px;
	--container-narrow: 1040px;
	--gutter: 32px;
	--radius: 10px;
	--radius-lg: 16px;

	/* Header heights (used to offset sticky elements) */
	--nav-height: 76px;
}

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

html {
	scroll-behavior: smooth;
}

body {
	font-family: var(--font-body);
	background: var(--ink);
	color: var(--silver-light);
	line-height: 1.6;
	font-size: 17px;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

/* Headings — Cormorant Garamond, warm white */
h1, h2, h3, h4, h5, h6 {
	font-family: var(--font-display);
	color: var(--warm-white);
	font-weight: 600;
	line-height: 1.15;
	letter-spacing: 0.3px;
}

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

a {
	color: var(--crimson-light);
	text-decoration: none;
	transition: color 0.2s ease;
}
a:hover {
	color: var(--crimson);
}

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

ul, ol {
	list-style: none;
}

button {
	font-family: inherit;
	cursor: pointer;
	border: none;
	background: none;
	color: inherit;
}

em {
	font-style: italic;
}

/* ----- Layout helpers ----- */
.container {
	width: 100%;
	max-width: var(--container);
	margin-inline: auto;
	padding-inline: var(--gutter);
}

.section {
	padding-block: 88px;
}

/* ----- Shared type patterns ----- */
.section-label {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	font-family: var(--font-mono);
	font-size: 11px;
	font-weight: 500;
	letter-spacing: 2.5px;
	text-transform: uppercase;
	color: var(--crimson);
	margin-bottom: 18px;
}
.section-label::before {
	content: '';
	width: 28px;
	height: 1px;
	background: var(--crimson);
}
.section-label--gold {
	color: var(--gold);
}
.section-label--gold::before {
	background: var(--gold);
}
/* Centered variant — center the label (dash + text) within its section. */
.section-label--center {
	display: flex;
	justify-content: center;
}

.section-title {
	font-size: clamp(28px, 4vw, 42px);
	font-weight: 600;
	color: var(--warm-white);
	max-width: 900px;
	margin-bottom: 18px;
	letter-spacing: 0.2px;
}

.section-intro {
	font-size: 17px;
	color: var(--silver-light);
	max-width: 760px;
	margin-bottom: 40px;
}

/* Inline forward links */
.text-link {
	display: inline-block;
	font-family: var(--font-body);
	font-weight: 600;
	font-size: 14px;
	letter-spacing: 0.5px;
	color: var(--crimson-light);
}
.text-link:hover {
	color: var(--crimson);
}
.text-link--gold {
	color: var(--gold);
}
.text-link--gold:hover {
	color: var(--gold-light);
}

/* Mono reassurance line */
.reassurance-line {
	font-family: var(--font-mono);
	font-size: 11px;
	letter-spacing: 1.5px;
	text-transform: uppercase;
	color: var(--gold);
}

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

:focus-visible {
	outline: 2px solid var(--gold);
	outline-offset: 2px;
}

/* ----- Scroll-reveal animation -----
   Elements start hidden only when JS is active (html.js), so content is never
   trapped invisible if JavaScript fails to run. main.js adds .is-visible. */
.js .reveal {
	opacity: 0;
	transform: translateY(26px);
	transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
	will-change: opacity, transform;
}
.js .reveal.is-visible {
	opacity: 1;
	transform: none;
}
@media (prefers-reduced-motion: reduce) {
	.js .reveal {
		opacity: 1;
		transform: none;
	}
}
