/*
 * Dragonfinity Systems
 * assets/css/brand.css — corporate typography, colour and cards
 *
 * Loaded after style.css, responsive.css and portfolio.css on the PHP public
 * pages, so it restyles them without touching the blog, which keeps its own
 * styles. Colours come from the logo: infinity ink, dragon red (used
 * sparingly for actions and emphasis) and the site's existing navy.
 */

:root {
	--ink: #15131d;
	--ink-soft: #3d3b4a;
	--grey: #5b6072;
	--grey-light: #8a8fa0;
	--navy: #0e2a6b;
	--navy-deep: #091c4a;
	--red: #c8102e;
	--red-dark: #a50d25;
	--paper: #f5f6f8;
	--white: #ffffff;
	--rule: #e3e5ec;
	--rule-strong: #cfd3de;

	/* Remap the tokens style.css and portfolio.css already use */
	--bg: var(--paper);
	--surface: var(--white);
	--surface-soft: #f8f9fb;
	--text: var(--ink);
	--text-soft: var(--grey);
	--text-muted: var(--grey-light);
	--accent: var(--navy);
	--accent-strong: var(--navy);
	--accent-glow: rgba(200, 16, 46, 0.35);
	--line: var(--rule);
	--line-strong: var(--rule-strong);
	--radius: 8px;
	--radius-sm: 6px;
	--shadow-sm: 0 1px 2px rgba(16, 20, 40, 0.06);
	--shadow-md: 0 10px 28px rgba(16, 20, 40, 0.09);
	--font-display: "IBM Plex Sans", "Segoe UI", Arial, sans-serif;
	--font-body: "IBM Plex Sans", "Segoe UI", Arial, sans-serif;
	--font-mono: "IBM Plex Mono", Consolas, monospace;
}

/* Typography ----------------------------------------------------------------- */

body {
	background: var(--paper);
	color: var(--ink);
	font-family: var(--font-body);
	font-size: 1rem;
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

h1,
h2,
h3 {
	font-family: var(--font-display);
	color: var(--ink);
	letter-spacing: -0.015em;
}

h1 {
	font-size: clamp(2.1rem, 2.6vw + 1.2rem, 3.4rem);
	font-weight: 700;
	line-height: 1.1;
	letter-spacing: -0.025em;
}

h2 {
	font-size: clamp(1.5rem, 1.2vw + 1rem, 2.1rem);
	font-weight: 600;
	line-height: 1.2;
}

h3 {
	font-size: 1.15rem;
	font-weight: 600;
	line-height: 1.3;
}

p,
li {
	color: var(--ink-soft);
}

.lead {
	color: var(--grey);
	font-size: clamp(1.05rem, 0.4vw + 0.95rem, 1.2rem);
	line-height: 1.6;
	font-weight: 400;
}

/* Section labels: small caps with a short red rule, not a pill */
.kicker,
.card-eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 0.6rem;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: none;
	color: var(--red);
	font-family: var(--font-body);
	font-size: 0.78rem;
	font-weight: 600;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}

.kicker::before {
	content: "";
	width: 1.75rem;
	height: 2px;
	background: currentColor;
}

.hero .kicker {
	background: none;
	border: 0;
	color: #ff8a98;
}

/* Links ------------------------------------------------------------------------ */

main a:not(.btn):not(.chip):not(.card):not(.category-card):not(.contact-method),
.prose a {
	color: var(--navy);
	text-decoration: underline;
	text-decoration-color: rgba(14, 42, 107, 0.3);
	text-decoration-thickness: 1px;
	text-underline-offset: 0.2em;
	transition: color 0.15s ease, text-decoration-color 0.15s ease;
}

main a:not(.btn):not(.chip):not(.card):not(.category-card):not(.contact-method):hover,
.prose a:hover {
	color: var(--red);
	text-decoration-color: var(--red);
}

/* Headline links inside cards read as headings until hovered
   (!important: the general link rule above is deliberately very specific) */
.product-card h3 a {
	color: var(--ink) !important;
	text-decoration: none !important;
}

.product-card h3 a:hover {
	color: var(--red) !important;
}

.text-link {
	font-weight: 600;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
	outline: 2px solid var(--red);
	outline-offset: 2px;
}

/* Navigation ------------------------------------------------------------------- */

.topbar {
	background: var(--white);
	border-bottom: 1px solid var(--rule);
}

.brand-text,
.nav-brand-text {
	font-family: var(--font-display);
	font-weight: 700;
	letter-spacing: -0.01em;
	color: var(--ink);
}

.topbar-tagline {
	color: var(--grey);
	font-size: 0.85rem;
	letter-spacing: 0.02em;
}

.lang-toggle {
	border-radius: var(--radius-sm);
	border-color: var(--rule-strong);
	color: var(--ink);
	font-family: var(--font-body);
	font-weight: 600;
}

.main-nav {
	background: rgba(255, 255, 255, 0.97);
	border-bottom: 1px solid var(--rule);
}

.menu-list a {
	position: relative;
	border-radius: 0;
	padding: 0.6rem 0.85rem;
	color: var(--ink-soft);
	font-family: var(--font-body);
	font-weight: 500;
	font-size: 0.95rem;
}

.menu-list a:hover,
.menu-list a.active {
	background: none;
	color: var(--ink);
	transform: none;
}

/* Active page: a red bar under the link (desktop), beside it (mobile menu) */
.menu-list a.active::after {
	content: "";
	position: absolute;
	left: 0.85rem;
	right: 0.85rem;
	bottom: 0.2rem;
	height: 2px;
	background: var(--red);
}

/* Buttons ------------------------------------------------------------------------ */

.btn {
	border-radius: var(--radius-sm);
	font-family: var(--font-body);
	font-weight: 600;
	letter-spacing: 0.01em;
	box-shadow: none;
	transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn:hover {
	transform: none;
}

.btn-primary {
	background: var(--red);
	border-color: var(--red);
	color: var(--white);
	box-shadow: none;
}

.btn-primary:hover {
	background: var(--red-dark);
	border-color: var(--red-dark);
	box-shadow: none;
}

.btn-outline {
	background: var(--white);
	border-color: var(--rule-strong);
	color: var(--ink);
}

.btn-outline:hover {
	background: var(--white);
	border-color: var(--ink);
	color: var(--ink);
}

.hero .btn-outline,
.cta-banner .btn-outline {
	background: transparent;
	border-color: rgba(255, 255, 255, 0.55);
	color: var(--white);
}

.hero .btn-outline:hover,
.cta-banner .btn-outline:hover {
	background: rgba(255, 255, 255, 0.1);
	border-color: var(--white);
}

/* Cards ------------------------------------------------------------------------- */

.card,
.metric,
.contact-form,
.filter-bar {
	position: relative;
	background: var(--white);
	border: 1px solid var(--rule);
	border-radius: var(--radius);
	box-shadow: var(--shadow-sm);
}

/* Signature: a red line along the top edge appears on hover */
.card::before {
	content: "";
	position: absolute;
	top: -1px;
	left: -1px;
	right: -1px;
	height: 3px;
	border-radius: var(--radius) var(--radius) 0 0;
	background: var(--red);
	transform: scaleX(0);
	transform-origin: left;
	transition: transform 0.25s ease;
}

.card:hover {
	border-color: var(--rule-strong);
	box-shadow: var(--shadow-md);
}

.card:hover::before,
.card:focus-within::before {
	transform: scaleX(1);
}

.category-card:hover,
.category-card:focus-visible {
	transform: translateY(-2px);
	border-color: var(--rule-strong);
}

.category-card h2,
.category-card h3 {
	color: var(--ink);
}

.category-count {
	color: var(--red);
	font-size: 0.85rem;
	font-weight: 600;
	letter-spacing: 0.02em;
}

.product-logo {
	border-radius: var(--radius-sm);
	border-color: var(--rule);
	background: var(--surface-soft);
}

.product-logo-initial {
	background: var(--ink);
	color: var(--white);
	font-family: var(--font-display);
	font-weight: 600;
}

.product-card-meta a {
	color: var(--grey) !important;
	text-decoration: none !important;
	font-size: 0.85rem;
}

.product-card-meta a:hover {
	color: var(--red) !important;
}

.product-audience strong,
.fact-list dt {
	color: var(--ink);
}

.fact-list dt {
	font-size: 0.72rem;
	letter-spacing: 0.12em;
}

.benefit-list li::before {
	border-color: var(--red);
}

.feature-list li::before {
	background: var(--ink);
	border-radius: 0;
	width: 0.4rem;
	height: 0.4rem;
}

.link-list {
	border-top-color: var(--rule);
}

.link-list a {
	font-weight: 600;
}

/* Process: the four steps are a real sequence, so each carries its number */
.process-step {
	width: 2rem;
	height: 2rem;
	margin-bottom: 0.9rem;
	border-radius: var(--radius-sm);
	background: var(--ink);
	box-shadow: none;
	color: var(--white);
	font-family: var(--font-mono);
	font-size: 0.85rem;
	font-weight: 500;
}

.process-card h3 {
	margin-bottom: 0.4rem;
}

.process-card p {
	margin: 0;
}

/* Status badges and chips --------------------------------------------------------- */

.status-badge {
	border-radius: 3px;
	padding: 0.15rem 0.45rem;
	font-family: var(--font-mono);
	font-size: 0.68rem;
	font-weight: 500;
	letter-spacing: 0.04em;
}

.status-available { background: #e7f4ec; color: #136b3c; }
.status-beta { background: #e8edf8; color: var(--navy); }
.status-coming_soon { background: #fbf0dc; color: #7a4a00; }
.status-in_development { background: #efeaf6; color: #5b2a86; }

.chip {
	border-radius: var(--radius-sm);
	border-color: var(--rule-strong);
	background: var(--white);
	color: var(--ink-soft);
	font-weight: 500;
}

a.chip:hover,
a.chip:focus-visible {
	border-color: var(--ink);
	color: var(--ink);
}

.hero-card .chip {
	background: rgba(255, 255, 255, 0.08);
	border-color: rgba(255, 255, 255, 0.35);
	color: var(--white);
}

.hero-card .chip:hover {
	background: rgba(255, 255, 255, 0.16);
	border-color: var(--white);
	color: var(--white);
}

/* Sections, hero, banners --------------------------------------------------------- */

.section-contrast {
	background: var(--white);
	border-top: 1px solid var(--rule);
	border-bottom: 1px solid var(--rule);
}

.hero,
.cta-banner {
	background: linear-gradient(160deg, var(--navy-deep) 0%, var(--navy) 100%);
}

.hero h1 {
	color: var(--white);
}

.hero .lead,
.hero p {
	color: rgba(255, 255, 255, 0.82);
}

.hero .hero-subheadline {
	color: var(--white);
	font-weight: 500;
}

.hero-card {
	background: rgba(255, 255, 255, 0.06);
	border: 1px solid rgba(255, 255, 255, 0.18);
	border-radius: var(--radius);
	box-shadow: none;
	backdrop-filter: none;
}

.hero-card::before {
	display: none;
}

.hero-search input {
	border-radius: var(--radius-sm);
	border-color: transparent;
	font-family: var(--font-body);
}

.page-hero {
	background: var(--white);
	border-bottom: 1px solid var(--rule);
	padding-bottom: clamp(2rem, 3vw, 2.75rem);
}

.cta-banner {
	border-radius: var(--radius);
	border: 0;
	box-shadow: none;
}

.cta-banner h2 {
	color: var(--white);
}

.cta-banner p {
	color: rgba(255, 255, 255, 0.82);
}

.cta-inline {
	border-radius: var(--radius);
	background: var(--white);
	border-color: var(--rule);
}

.empty-state {
	border-radius: var(--radius);
	border-color: var(--rule-strong);
	background: var(--white);
}

.breadcrumbs a {
	color: var(--grey) !important;
	text-decoration: none !important;
	font-size: 0.85rem;
}

.breadcrumbs a:hover {
	color: var(--red) !important;
}

/* Forms ----------------------------------------------------------------------------- */

.filter-field input,
.filter-field select,
.form-field input,
.form-field select,
.form-field textarea {
	border-radius: var(--radius-sm);
	border-color: var(--rule-strong);
	font-family: var(--font-body);
}

.filter-field input:focus-visible,
.filter-field select:focus-visible,
.form-field input:focus-visible,
.form-field select:focus-visible,
.form-field textarea:focus-visible,
.hero-search input:focus-visible {
	outline: 2px solid var(--red);
	outline-offset: 1px;
	border-color: var(--ink);
}

.contact-method {
	border-radius: var(--radius-sm);
	border-color: var(--rule);
	background: var(--surface-soft);
}

.contact-method:hover {
	border-color: var(--ink);
	transform: none;
	box-shadow: none;
}

.contact-method-label {
	color: var(--red);
	font-size: 0.72rem;
	letter-spacing: 0.12em;
}

.contact-method-value {
	color: var(--ink);
}

.preview-banner {
	font-family: var(--font-body);
}

/* Footer ---------------------------------------------------------------------------- */

.site-footer {
	background: var(--ink);
	border-top: 3px solid var(--red);
}

.site-footer h3 {
	color: var(--white);
	font-size: 0.8rem;
	font-weight: 600;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}

.site-footer p,
.site-footer li {
	color: rgba(255, 255, 255, 0.7);
}

.site-footer a {
	color: rgba(255, 255, 255, 0.85);
	text-decoration: none;
}

.site-footer a:hover {
	color: var(--white);
	text-decoration: underline;
	text-decoration-color: var(--red);
	text-underline-offset: 0.25em;
}

.footer-bottom {
	border-top-color: rgba(255, 255, 255, 0.12);
}

.footer-bottom p {
	color: rgba(255, 255, 255, 0.55);
	font-size: 0.85rem;
}

/* Mobile menu: active marker sits at the left edge */
@media (max-width: 860px) {
	.main-nav.menu-open .menu-list {
		border-radius: var(--radius);
		border-color: var(--rule);
		box-shadow: var(--shadow-md);
	}

	.menu-list a.active::after {
		left: 0;
		right: auto;
		top: 0.5rem;
		bottom: 0.5rem;
		width: 3px;
		height: auto;
	}
}

@media (prefers-reduced-motion: reduce) {
	.card::before {
		transition: none;
	}

	.category-card:hover {
		transform: none;
	}
}
