/*
 * Design foundation taken from the Lovable prototype (discover-ua.lovable.app).
 * Tokens and base components only; pages opt in by using the ds-* classes,
 * so nothing here changes existing pages until they are migrated.
 *
 * Colors are the prototype's oklch theme converted to hex.
 * Fonts: the prototype names "UA Brand" but never loads it, so what renders is
 * Figtree (text) and Onest (headings) from Google Fonts.
 *
 * Font sizes are always em (never rem/px): the accessibility menu scales text via
 * font-size % on #page's children, which only em-based sizes inherit.
 *
 * Optical centring: in single-line buttons/pills Figtree renders ~1px above the
 * centre, so they take 1px more padding on top than at the bottom
 * (calc(x + 1px) / calc(x - 1px)), or padding-top: 2px when the height is fixed.
 * Keep that convention for new buttons.
 */

:root {
	/* Colors */
	--ds-background: #fefdfa;
	--ds-surface: #f9f7f2;
	--ds-card: #ffffff;
	--ds-foreground: #1a212b;
	--ds-ink: #122046;          /* headings, footer background */
	--ds-ink-soft: #606771;     /* secondary text */
	--ds-muted: #f4f2ee;
	--ds-muted-foreground: #6a717b;
	--ds-primary: #1536c4;
	--ds-primary-hover: #2c4ac9; /* primary at 90%, as hover:bg-primary/90 */
	--ds-primary-foreground: #ffffff;
	--ds-primary-soft: rgba(21, 54, 196, 0.08);
	--ds-secondary: #f3f1eb;
	--ds-accent: #fcefcf;
	--ds-accent-foreground: #182c62;
	--ds-gold: #ecc458;
	--ds-border: #e3e2dc;
	--ds-destructive: #e7000b;

	/* Typography */
	--ds-font-sans: 'Figtree', ui-sans-serif, system-ui, sans-serif;
	--ds-font-display: 'Onest', 'Figtree', ui-sans-serif, system-ui, sans-serif;
	--ds-heading-tracking: -0.01em; /* Lovable headings: tracking -0.01em */
	--ds-text-base: 1.0625em;   /* Lovable body text 17px; use on text blocks, not on wrappers */
	--ds-leading: 1.7;
	--ds-leading-heading: 1.12;

	/* Shape */
	--ds-radius-sm: 4px;
	--ds-radius-md: 6px;        /* buttons, inputs */
	--ds-radius: 8px;           /* cards */
	--ds-radius-xl: 12px;
	--ds-radius-full: 999px;    /* pills, chips */
	--ds-shadow-card: 0 1px 2px rgba(25, 32, 45, 0.06), 0 12px 28px -18px rgba(25, 32, 45, 0.22);
	--ds-shadow-card-hover: 0 2px 4px rgba(25, 32, 45, 0.08), 0 22px 44px -20px rgba(25, 32, 45, 0.28);

	/* Layout */
	--ds-shell: 78rem;          /* 1248px content width */
	--ds-gutter: 1.25rem;       /* 2rem from 768px */
	--ds-section: 4rem;         /* 6rem from 768px */
	--ds-transition: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

@media (min-width: 768px) {
	:root {
		--ds-gutter: 2rem;
		--ds-section: 6rem;
	}
}

/* Opt-in base: a migrated page wraps its content in .ds */
.ds {
	font-family: var(--ds-font-sans);
	/* stays 1em: font sizes inside are em-based (accessibility text size scales them),
	   a 17px wrapper would make every em inside compound */
	font-size: 1em;
	line-height: var(--ds-leading);
	color: var(--ds-foreground);
	-webkit-font-smoothing: antialiased;
}

.ds :where(h1, h2, h3, h4) {
	font-family: var(--ds-font-display);
	letter-spacing: var(--ds-heading-tracking);
	color: var(--ds-ink);
	line-height: var(--ds-leading-heading);
	text-wrap: balance;
}

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

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

.ds-section--surface {
	background-color: var(--ds-surface);
}

/* Section heading set: eyebrow + title + lead + link */
.ds-eyebrow {
	display: block;
	margin: 0;
	color: var(--ds-primary);
	font-size: 0.75em;
	font-weight: 600;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

.ds-section-title {
	margin: 0.75rem 0 0;
	font-family: var(--ds-font-display);
	letter-spacing: var(--ds-heading-tracking);
	font-size: 2em;
	font-weight: 600;
	line-height: 1.12;
	color: var(--ds-ink);
}

@media (min-width: 768px) {
	.ds-section-title {
		font-size: 2.75em;
	}
}

.ds-lead {
	margin: 1rem 0 0;
	max-width: 42rem;
	font-size: 1em;
	line-height: 1.625;
	color: var(--ds-ink-soft);
}

@media (min-width: 768px) {
	.ds-lead {
		font-size: 1.125em;
	}
}

.ds-section-link {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	font-size: 0.9375em;
	font-weight: 600;
	color: var(--ds-primary);
	text-decoration: none;
	transition: gap var(--ds-transition), color var(--ds-transition);
}

.ds-section-link:hover {
	gap: 0.75rem;
	color: var(--ds-primary-hover);
}

/* Buttons */
.ds-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	padding: calc(0.875rem + 1px) 1.75rem calc(0.875rem - 1px);
	border: 1px solid var(--ds-primary);
	border-radius: var(--ds-radius-md);
	background-color: var(--ds-primary);
	color: var(--ds-primary-foreground);
	font-family: var(--ds-font-sans);
	font-size: 1em;
	font-weight: 600;
	line-height: 1.5;
	text-decoration: none;
	cursor: pointer;
	transition: background-color var(--ds-transition), border-color var(--ds-transition), color var(--ds-transition);
}

.ds-btn:hover,
.ds-btn:focus-visible {
	background-color: var(--ds-primary-hover);
	border-color: var(--ds-primary-hover);
	color: var(--ds-primary-foreground);
}

.ds-btn--outline {
	background-color: transparent;
	color: var(--ds-primary);
}

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

.ds-btn--sm {
	padding: calc(0.5rem + 1px) 1rem calc(0.5rem - 1px);
	font-size: 0.9375em;
}

.ds-btn--pill {
	border-radius: var(--ds-radius-full);
}

/* Cards */
.ds-card {
	display: block;
	overflow: hidden;
	border-radius: var(--ds-radius);
	background-color: var(--ds-card);
	box-shadow: var(--ds-shadow-card);
	color: inherit;
	text-decoration: none;
	transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

/* Chips / tags */
.ds-chip {
	display: inline-flex;
	align-items: center;
	gap: 0.375rem;
	padding: calc(0.25rem + 1px) 0.75rem calc(0.25rem - 1px);
	border-radius: var(--ds-radius-full);
	background-color: var(--ds-primary-soft);
	color: var(--ds-primary);
	font-size: 0.8125em;
	font-weight: 600;
	line-height: 1.5;
}
