/**
 * Upland Technology — design system.
 * Palette, type scale, and usage all match Section 2 of the approved spec.
 * Built with WCAG 2.2 AA in mind throughout (Section 5): contrast, focus states,
 * keyboard-operable menus, skip link, and resizable text.
 */

/* -----------------------------------------------------------------------
 * 1. Brand tokens
 * -------------------------------------------------------------------- */
:root {
	--color-navy: #1F3A5F;      /* Primary — headers, text, header/footer backgrounds */
	--color-green: #0F6E5B;     /* Secondary — accents, links, icons */
	--color-amber: #E8A33D;     /* Highlight — primary CTA buttons only, large-text/UI use */
	--color-charcoal: #222222;  /* Body copy */
	--color-light-grey: #F2F4F6;/* Section backgrounds, striping */
	--color-white: #FFFFFF;

	--font-heading: 'Manrope', 'Segoe UI', Arial, sans-serif;
	--font-body: 'Inter', 'Segoe UI', Arial, sans-serif;

	--container-width: 1180px;
	--radius: 8px;
	--focus-outline: 3px solid var(--color-amber);
}

/* Uncomment once the woff2 files exist in assets/fonts/ — see assets/fonts/README.md */
/*
@font-face {
	font-family: 'Manrope';
	src: url('../fonts/manrope-700.woff2') format('woff2');
	font-weight: 700;
	font-display: swap;
}
@font-face {
	font-family: 'Inter';
	src: url('../fonts/inter-400.woff2') format('woff2');
	font-weight: 400;
	font-display: swap;
}
*/

/* -----------------------------------------------------------------------
 * 2. Reset & base
 * -------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
	margin: 0;
	font-family: var(--font-body);
	font-size: 1.0625rem;
	line-height: 1.6;
	color: var(--color-charcoal);
	background: var(--color-white);
}

h1, h2, h3, h4 {
	font-family: var(--font-heading);
	color: var(--color-navy);
	line-height: 1.2;
	margin: 0 0 0.6em;
}
h1 { font-size: clamp(1.9rem, 4vw, 2.75rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
h3 { font-size: 1.2rem; }

p { margin: 0 0 1em; }

a { color: var(--color-green); text-decoration-thickness: 2px; }
a:hover { text-decoration-thickness: 3px; }

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

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

/* -----------------------------------------------------------------------
 * 3. Accessibility essentials (Section 5)
 * -------------------------------------------------------------------- */

/* Visible only when focused, per WCAG 2.4.1 (Bypass Blocks). */
.skip-link {
	position: absolute;
	left: -9999px;
	top: 0;
	background: var(--color-navy);
	color: var(--color-white);
	padding: 0.75em 1.25em;
	z-index: 1000;
	border-radius: 0 0 var(--radius) 0;
}
.skip-link:focus {
	left: 0;
}

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

/* A single, consistent, highly visible focus style everywhere — buttons, links, form
   controls — meeting WCAG 2.2's stricter focus-appearance criterion (2.4.11). */
a:focus-visible,
button:focus-visible,
input:focus-visible,
[tabindex]:focus-visible {
	outline: var(--focus-outline);
	outline-offset: 2px;
}

/* -----------------------------------------------------------------------
 * 4. Buttons
 * -------------------------------------------------------------------- */
.button {
	display: inline-block;
	padding: 0.75em 1.5em;
	border-radius: var(--radius);
	font-weight: 600;
	text-decoration: none;
	min-height: 44px; /* WCAG 2.2 target-size (2.5.8) */
	line-height: 1.3;
}
.button--primary {
	background: var(--color-amber);
	color: var(--color-navy);
}
.button--primary:hover {
	background: #d6902c;
}

/* -----------------------------------------------------------------------
 * 5. Header / utility bar / navigation
 * -------------------------------------------------------------------- */
.utility-bar {
	background: var(--color-navy);
	color: var(--color-white);
}
.utility-bar__inner {
	display: flex;
	justify-content: flex-end;
	padding-block: 0.4rem;
}
.utility-menu {
	list-style: none;
	display: flex;
	gap: 1.25rem;
	margin: 0;
	padding: 0;
}
.utility-menu a {
	color: var(--color-white);
	font-size: 0.9rem;
}

.primary-header {
	background: var(--color-white);
	border-bottom: 1px solid var(--color-light-grey);
}
.primary-header__inner {
	display: flex;
	align-items: center;
	gap: 1.5rem;
	padding-block: 1rem;
}

.site-branding {
	font-family: var(--font-heading);
	font-weight: 800;
	font-size: 1.3rem;
	color: var(--color-navy);
	text-decoration: none;
	margin-right: auto;
}

.nav-toggle {
	display: none;
	background: none;
	border: 2px solid var(--color-navy);
	border-radius: var(--radius);
	min-height: 44px;
	min-width: 44px;
	cursor: pointer;
}
.nav-toggle__icon,
.nav-toggle__icon::before,
.nav-toggle__icon::after {
	display: block;
	width: 20px;
	height: 2px;
	background: var(--color-navy);
	margin: 4px auto;
}

.primary-nav__list {
	list-style: none;
	display: flex;
	align-items: center;
	gap: 1.5rem;
	margin: 0;
	padding: 0;
}
.primary-nav__list > li {
	position: relative;
}
.primary-nav__list > li > a,
.submenu-toggle {
	background: none;
	border: none;
	font: inherit;
	font-weight: 600;
	color: var(--color-navy);
	cursor: pointer;
	padding: 0.5rem 0;
}
.submenu {
	list-style: none;
	margin: 0;
	padding: 0.75rem;
	position: absolute;
	top: 100%;
	left: 0;
	background: var(--color-white);
	border: 1px solid var(--color-light-grey);
	border-radius: var(--radius);
	box-shadow: 0 8px 24px rgba(31, 58, 95, 0.12);
	min-width: 220px;
	display: none;
}
.submenu.is-open { display: block; }
.submenu li { margin-bottom: 0.4rem; }
.submenu li:last-child { margin-bottom: 0; }

/* Sectors has 7 items — a two-column layout keeps the dropdown compact (spec Section 4). */
.submenu--two-col {
	column-count: 2;
	column-gap: 1.5rem;
	min-width: 380px;
}

.header-cta { flex-shrink: 0; }

@media (max-width: 900px) {
	.nav-toggle { display: block; }
	.primary-nav {
		display: none;
		width: 100%;
		order: 3;
	}
	.primary-nav.is-open { display: block; }
	.primary-nav__list { flex-direction: column; align-items: flex-start; }
	.submenu { position: static; box-shadow: none; display: none; }
	.submenu.is-open { display: block; }
	.submenu--two-col { column-count: 1; min-width: 0; }
}

/* -----------------------------------------------------------------------
 * 6. Homepage sections
 * -------------------------------------------------------------------- */
section { padding-block: 3.5rem; }

.hero {
	background: var(--color-navy);
	color: var(--color-white);
	text-align: center;
}
.hero h1 { color: var(--color-white); }
.hero__subheading { font-size: 1.2rem; max-width: 42em; margin-inline: auto 1.5em; }

.intro { text-align: center; }
.intro p { max-width: 50em; margin-inline: auto; font-size: 1.15rem; }

.sector-cards, .featured-insights { background: var(--color-light-grey); }

.card-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
	gap: 1.5rem;
	margin-block: 2rem;
}
.card-grid--3col { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 800px) {
	.card-grid--3col { grid-template-columns: 1fr; }
}

.card {
	display: block;
	background: var(--color-white);
	border: 1px solid var(--color-light-grey);
	border-radius: var(--radius);
	padding: 1.5rem;
	text-decoration: none;
	color: inherit;
	transition: box-shadow 0.15s ease;
}
.card:hover { box-shadow: 0 8px 24px rgba(31, 58, 95, 0.12); }
.card h2, .card h3 { margin-bottom: 0.4em; }

.link-more { font-weight: 600; }

.testimonials__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	gap: 1.5rem;
}
.testimonial {
	background: var(--color-light-grey);
	border-radius: var(--radius);
	padding: 1.5rem;
}
.testimonial blockquote { margin: 0 0 1em; font-style: italic; }
.testimonial__attribution { font-weight: 600; color: var(--color-navy); margin: 0; }

.why-upland ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 1rem;
}
.why-upland li {
	background: var(--color-light-grey);
	border-radius: var(--radius);
	padding: 1rem 1.25rem;
	font-weight: 600;
	color: var(--color-navy);
}

.cta-banner {
	background: var(--color-green);
	color: var(--color-white);
	text-align: center;
}
.cta-banner h2 { color: var(--color-white); }

/* -----------------------------------------------------------------------
 * 7. Generic page / detail templates
 * -------------------------------------------------------------------- */
.page-content { padding-block: 3rem; }
.entry-subtitle { font-size: 1.2rem; color: var(--color-green); }
.entry-meta { color: #595959; font-size: 0.95rem; }

.contact-details { display: grid; gap: 0.25rem 1.5rem; grid-template-columns: max-content 1fr; margin-top: 2rem; }
.contact-details dt { font-weight: 700; color: var(--color-navy); }
.contact-details dd { margin: 0 0 0.75rem; }

/* -----------------------------------------------------------------------
 * 8. Footer
 * -------------------------------------------------------------------- */
.site-footer {
	background: var(--color-navy);
	color: var(--color-white);
	padding-block: 3rem 1.5rem;
}
.site-footer a { color: var(--color-white); }
.site-footer h2 { color: var(--color-white); font-size: 1rem; text-transform: uppercase; letter-spacing: 0.04em; }

.footer__columns {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 2rem;
	margin-bottom: 2.5rem;
}
@media (max-width: 800px) {
	.footer__columns { grid-template-columns: repeat(2, 1fr); }
}
.footer__columns ul { list-style: none; margin: 0; padding: 0; }
.footer__columns li { margin-bottom: 0.5rem; }

.footer__bottom {
	border-top: 1px solid rgba(255, 255, 255, 0.15);
	padding-top: 1.5rem;
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: center;
	gap: 1rem;
}
.social-links { list-style: none; display: flex; gap: 1rem; margin: 0; padding: 0; }
.footer__legal { font-size: 0.85rem; margin: 0; }
.footer__legal a { text-decoration: underline; }
