/* Shared dark-themed shell for content/article prototypes.
   Used by learn-more.html, ca-ideal.html, and every platform sub-page prototype.
   The splash homepage (index.html) keeps its own inline styles. */

:root {
	--bg: #171E2D;
	--text: #ffffff;
	--text-dim: rgba(255, 255, 255, 0.88);
	--button-bg: #ffffff;
	--button-text: #171E2D;
	--link: #8fb4ff;
}

/* Cross-document view transitions — Chrome/Edge/Safari smoothly cross-fade
   between pages instead of flashing the background. Firefox ignores this. */
@view-transition { navigation: auto; }

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { min-height: 100%; }

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

/* Skip-to-content link — visually hidden until focused, then visible */
.skip-link {
	position: fixed;
	top: 0.5rem; left: 0.5rem;
	z-index: 100;
	padding: 0.6rem 1rem;
	background: #ffffff;
	color: #171E2D;
	text-decoration: none;
	font-weight: 600;
	font-size: 0.95rem;
	border-radius: 4px;
	box-shadow: 0 2px 8px rgba(0,0,0,0.4);
	transform: translateY(-150%);
	transition: transform 0.2s ease;
}
.skip-link:focus, .skip-link:focus-visible {
	transform: translateY(0);
	outline: 2px solid #171E2D;
	outline-offset: 2px;
}

/* Respect users who prefer 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;
	}
}

body {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	background-color: var(--bg);
	background-image: url('assets/bg.png');
	background-size: cover;          /* fills width or height, whichever is larger */
	background-position: center center;
	background-repeat: no-repeat;
	background-attachment: fixed;
	color: var(--text);
}

/* Fixed top bar — sits behind logo/hamburger, in front of scrolling content */
body::before {
	content: "";
	position: fixed;
	top: 0; left: 0; right: 0;
	height: calc(62px + 1.5rem);
	background: var(--bg);
	z-index: 24;
	pointer-events: none;
}

/* Logo (top-left) — 140% of the 44px hamburger */
.logo-link {
	position: fixed;
	top: 0.75rem;
	left: 1.5rem;
	z-index: 25;
	display: block;
	line-height: 0;
}
.logo-link:focus-visible {
	outline: 2px solid var(--text); outline-offset: 4px; border-radius: 4px;
}
.logo {
	height: 62px;
	width: auto;
	display: block;
}
@media (max-width: 480px) {
	.logo-link { left: 1rem; }
}

/* Hamburger button */
.hamburger {
	position: fixed; top: 1rem; right: 1.5rem;
	width: 44px; height: 44px;
	background: transparent; border: 0; cursor: pointer;
	z-index: 30;
	display: flex; flex-direction: column; justify-content: center; align-items: center;
	gap: 6px; padding: 0;
}
.hamburger span {
	display: block; width: 28px; height: 3px;
	background: var(--text); border-radius: 2px;
	transition: transform 0.3s ease, opacity 0.3s ease;
}
.hamburger[aria-expanded="true"] span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.hamburger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.hamburger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }
.hamburger:focus-visible { outline: 2px solid var(--text); outline-offset: 4px; border-radius: 4px; }

/* Slide-in menu drawer */
.menu {
	position: fixed; top: 0; right: 0;
	width: 320px; max-width: 85vw; height: 100vh;
	background: rgba(23, 30, 45, 0.97);
	-webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
	border-left: 1px solid rgba(255, 255, 255, 0.12);
	padding: 5.5rem 2rem 2rem;
	transform: translateX(100%);
	transition: transform 0.3s ease;
	z-index: 20; overflow-y: auto;
}
.menu[data-open="true"] { transform: translateX(0); }
.menu a {
	display: block;
	color: var(--text); text-decoration: none;
	padding: 0.5rem 0;
	border-bottom: 1px solid rgba(255, 255, 255, 0.1);
	font-size: 1rem; letter-spacing: 0.01em;
	transition: color 0.15s ease, padding-left 0.15s ease;
}
.menu a:hover, .menu a:focus-visible {
	color: var(--link); padding-left: 0.4rem; outline: none;
}
.menu .section-label {
	display: block;
	padding: 0.65rem 0 0.3rem;
	font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.12em;
	color: rgba(255, 255, 255, 0.45);
}
.menu a.sub {
	font-size: 0.92rem; padding: 0.4rem 0 0.4rem 1rem;
	color: rgba(255, 255, 255, 0.82);
	border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.menu a.sub:hover, .menu a.sub:focus-visible {
	padding-left: 1.4rem; color: var(--link);
}
.menu a.active {
	color: var(--link); font-weight: 600;
}

/* Backdrop */
.backdrop {
	position: fixed; inset: 0;
	background: rgba(0, 0, 0, 0.4);
	opacity: 0; pointer-events: none;
	transition: opacity 0.3s ease;
	z-index: 15;
}
.backdrop[data-open="true"] { opacity: 1; pointer-events: auto; }

/* Article container — top margin clears the fixed header bar */
article {
	max-width: 720px;
	margin: calc(62px + 3rem) auto 6rem;
	padding: 0 1.75rem;
	line-height: 1.75;
	font-size: 1.06rem;
}
article h1 {
	font-size: clamp(2.4rem, 6vw, 3.5rem);
	margin: 0 0 2rem;
	color: var(--text);
	font-weight: 700;
	letter-spacing: -0.025em;
	line-height: 1.1;
}
article h2 {
	font-size: clamp(1.5rem, 3.5vw, 2rem);
	font-weight: 700;
	margin: 2.5rem 0 1rem;
	color: var(--text);
	letter-spacing: -0.015em;
	line-height: 1.2;
}
article h3 {
	font-size: clamp(1.2rem, 2.5vw, 1.5rem);
	font-weight: 600;
	margin: 2rem 0 0.75rem;
	color: var(--text);
	letter-spacing: -0.01em;
}
article h4 {
	font-size: 1.15rem;
	font-weight: 600;
	margin: 1.5rem 0 0.5rem;
	color: var(--text);
}
article h5, article h6 {
	font-size: 1rem;
	font-weight: 600;
	margin: 1.25rem 0 0.5rem;
	color: var(--text);
}
article p {
	margin: 0 0 1.4rem;
	color: var(--text-dim);
}
article > p:first-of-type {
	font-size: clamp(1.2rem, 2.5vw, 1.45rem);
	font-weight: 500;
	color: var(--text);
	line-height: 1.5;
	margin-bottom: 2.5rem;
}
article ul, article ol {
	margin: 1rem 0 1.75rem 1.5rem;
	color: var(--text-dim);
}
article li { margin-bottom: 0.55rem; }
article li > ul, article li > ol {
	margin: 0.5rem 0 0.75rem 1.25rem;
}
article a { color: var(--link); }
article strong { color: var(--text); font-weight: 600; }
article em { font-style: italic; }
article img {
	display: block;
	max-width: 100%;
	height: auto;
	margin: 1.5rem auto;
	border-radius: 8px;
}
article figure { margin: 1.5rem 0; }
article figcaption {
	text-align: center;
	font-size: 0.9rem;
	color: rgba(255, 255, 255, 0.6);
	margin-top: 0.5rem;
}
article blockquote {
	margin: 1.5rem 0;
	padding: 0.5rem 0 0.5rem 1.5rem;
	border-left: 3px solid rgba(255, 255, 255, 0.3);
	font-style: italic;
	color: rgba(255, 255, 255, 0.82);
}
article table {
	width: 100%;
	margin: 1.5rem 0;
	border-collapse: collapse;
	color: var(--text-dim);
	font-size: 0.95rem;
}
article th, article td {
	padding: 0.6rem 0.8rem;
	border-bottom: 1px solid rgba(255, 255, 255, 0.15);
	text-align: left;
}
article th {
	background: rgba(255, 255, 255, 0.04);
	font-weight: 600;
	color: var(--text);
}
article code {
	background: rgba(255, 255, 255, 0.08);
	padding: 0.15rem 0.4rem;
	border-radius: 4px;
	font-family: ui-monospace, SFMono-Regular, "Monaco", "Consolas", monospace;
	font-size: 0.95em;
	color: #e4ecff;
}
article pre {
	background: rgba(255, 255, 255, 0.05);
	padding: 1rem;
	border-radius: 8px;
	overflow-x: auto;
	margin: 1.5rem 0;
}
article pre code { background: transparent; padding: 0; }
article hr {
	border: 0;
	height: 1px;
	background: rgba(255, 255, 255, 0.12);
	margin: 2.5rem 0;
}

/* Contact page — regional contact-info grid */
article .contact-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
	gap: 2.25rem;
	margin: 2rem 0 3rem;
	list-style: none;
	padding: 0;
}
article .contact-block {
	display: block;
}
article .contact-block h2 {
	margin: 0 0 1rem;
	font-size: 1.35rem;
	color: var(--text);
}
article .contact-block .contact-list {
	list-style: none;
	margin: 0;
	padding: 0;
}
article .contact-block .contact-list li {
	margin: 0 0 0.85rem;
	padding: 0;
}
article .contact-block .contact-list .label {
	display: block;
	font-size: 0.72rem;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	color: rgba(255, 255, 255, 0.5);
	margin-bottom: 0.15rem;
}
article .contact-block .contact-list .value {
	display: block;
	font-size: 1rem;
	color: rgba(255, 255, 255, 0.95);
	line-height: 1.45;
}
article .contact-block .contact-list .value a {
	color: var(--link);
	text-decoration: none;
}
article .contact-block .contact-list .value a:hover,
article .contact-block .contact-list .value a:focus-visible {
	text-decoration: underline;
}
article .contact-map {
	display: block;
	width: 100%;
	height: 200px;
	border: 0;
	border-radius: 8px;
	margin-top: 1.25rem;
	filter: grayscale(15%) brightness(0.88);
}

/* Utility classes used on the LexAI Learn More page */
article .closing {
	font-weight: 600;
	color: var(--text);
	font-size: 1.15rem;
	margin-top: 2.5rem;
}
article .final {
	font-size: 1.6rem;
	font-weight: 700;
	color: var(--text);
	margin-top: 3rem;
	letter-spacing: -0.01em;
}

/* End CTA block */
.end-cta {
	margin-top: 4rem;
	padding-top: 3rem;
	border-top: 1px solid rgba(255, 255, 255, 0.15);
	text-align: center;
}
.end-cta h2 {
	font-size: clamp(1.5rem, 4vw, 2.1rem);
	font-weight: 700;
	margin: 0 0 0.75rem;
	letter-spacing: -0.02em;
	color: var(--text);
}
.end-cta p {
	color: var(--text-dim);
	margin: 0 0 2rem;
}
.end-cta .primary-cta {
	display: inline-block;
	background: var(--button-bg);
	color: var(--button-text);
	padding: 0.95rem 2.75rem;
	border-radius: 999px;
	text-decoration: none;
	font-weight: 600;
	font-size: 1.05rem;
	transition: transform 0.15s ease, box-shadow 0.15s ease;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
}
.end-cta .primary-cta:hover, .end-cta .primary-cta:focus-visible {
	transform: translateY(-2px);
	box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
	outline: none;
}
.end-cta .secondary-link {
	display: block;
	margin-top: 1.5rem;
	color: rgba(255, 255, 255, 0.55);
	text-decoration: none;
	font-size: 0.9rem;
	transition: color 0.15s ease;
}
.end-cta .secondary-link:hover, .end-cta .secondary-link:focus-visible {
	color: var(--text); outline: none;
}

@media (max-width: 480px) {
	.hamburger { right: 1rem; }
	article { margin: calc(62px + 2rem) auto 4rem; padding: 0 1.25rem; }
}
