/*
 * Design tokens: the single source of truth for colour, type and spacing.
 * Values from design standard "v7" (denim palette, 2026-11-17): the Home page and all sub-pages.
 * Original token names kept; new tokens named by role.
 * Every text/background pair listed passes WCAG AA (4.5:1) at the sizes used.
 */
:root {
	/* Colour: original names */
	--tln-color-ink: #1b2c48;              /* headings and strong text on light, 12.6:1 on surface */
	--tln-color-body: #22324a;             /* body paragraphs on light */
	--tln-color-ink-muted: #4c6276;        /* secondary text on light, 5.7:1 */
	--tln-color-surface: #EDF4FA;          /* Cloud Blue: main light background */
	--tln-color-surface-alt: #fafbfb;      /* white: cards, trust bar, form */
	--tln-color-brand: #243A5E;            /* Midnight Blue: dark bands, sticky menu bar, dark button, headings on light */
	--tln-color-accent: #3f6383;           /* Dusty Denim deepened: links, titles and accents on light, 5.7:1 */
	--tln-color-accent-hover: #2f4d68;
	--tln-color-accent-light: #4b6e90;     /* lighter link (e.g. "Click for more"), 4.8:1 */
	--tln-color-focus: #243A5E;            /* focus ring on light surfaces */

	/* Colour: added by role */
	--tln-color-surface-hero: #36383c;     /* studio slate: base of the homepage hero, every page header and the About portrait panel (CSS backdrops below; the studio photo is retired, 2026-11-18) */
	--tln-color-hero-darken: rgba(14, 15, 18, 0.3); /* extra darkening layer over the backdrop on inner-page headers (not Home) */
	--tln-color-accent-on-dark: #8FB6D8;   /* Calm Ocean: primary button (Midnight text), active menu item, icons and links on dark; 5.4:1 on Midnight */
	--tln-color-accent-on-dark-hover: #b4cfe6;
	--tln-color-on-dark: #EDF4FA;          /* headings and text on dark, 10.3:1 on Midnight */
	--tln-color-on-dark-muted: #CFE3F1;    /* Powder Sky: secondary text on dark, 8.6:1 */
	--tln-color-focus-on-dark: #8FB6D8;    /* focus ring on dark surfaces */
	--tln-color-surface-footer: #1a2a45;   /* footer: a step darker than the Midnight Blue bands above it */
	--tln-color-denim: #5F86A6;            /* Dusty Denim: decorative only (not for text on light) */

	/* Divider rule: the one style for every divider on light surfaces
	   (trust-bar separators, contact rule, list and section lines). */
	--tln-rule-color: rgba(36, 58, 94, 0.14);
	--tln-rule: 1px solid var(--tln-rule-color);

	/* Type: all Google Fonts / SIL OFL; self-host WOFF2 in assets/fonts/ */
	--tln-font-display: "Libre Caslon Display", "Libre Caslon Display Fallback", Georgia, "Times New Roman", serif;  /* headings, hero quote (400 only) */
	--tln-font-serif: "Libre Caslon Text", "Libre Caslon Text Fallback", Georgia, "Times New Roman", serif;       /* card titles, trust-bar headlines, quote (400, 400 italic) */
	--tln-font-body: "Alegreya Sans", "Alegreya Sans Fallback", -apple-system, "Segoe UI", sans-serif;       /* body and UI (400, 500, 700) */

	/* Sizes: set for an older readership. Nothing below 17px. */
	--tln-text-small: 1.0625rem;           /* 17px: card text, meta, trust-bar second line, menu */
	--tln-text-ui: 1.125rem;               /* 18px: buttons, text links */
	--tln-text-base: 1.1875rem;            /* 19px: body paragraphs */
	--tln-text-lead: 1.25rem;              /* 20px: hero introduction */
	--tln-text-h3: 1.4375rem;              /* 23px: card and service titles, trust-bar headlines */
	--tln-text-h2: 2.625rem;               /* 42px (32px on phones) */
	--tln-text-display: clamp(2.375rem, 4.3vw, 3.875rem); /* hero quote, 38 to 62px */
	--tln-leading-body: 1.75;

	/* Space */
	--tln-space-1: 0.25rem;
	--tln-space-2: 0.625rem;
	--tln-space-3: 1.125rem;
	--tln-space-4: 1.75rem;
	--tln-space-5: 3.5rem;                 /* 56px: side padding */
	--tln-space-6: 6rem;                   /* 96px: section padding (56px on phones) */

	/* Layout */
	--tln-content-max: 73.75rem;           /* 1180px */
	--tln-radius: 3px;                     /* buttons only */

	/* Motion: hover is a subtle zoom (no underlines); off under prefers-reduced-motion */
	--tln-zoom-link: 1.04;                 /* text links and buttons */
	--tln-zoom-title: 1.03;                /* list and card titles, from the left edge */
	--tln-zoom-duration: 0.2s;
}

/*
 * Build additions (2026-11-18): values the design uses inline but did not name.
 * Named by role. Phone values follow the design's single 860px breakpoint.
 */
:root {
	--tln-text-h1: 3.625rem;               /* 58px page titles (42px on phones) */
	--tln-leading-h1: 1.06;
	--tln-leading-h2: 1.12;
	--tln-leading-h3: 1.3;
	--tln-color-field-border: #8a909c;     /* form field borders, 3.3:1 on white */
	--tln-color-white: #ffffff;            /* form field background, hero text */

	/* Header and footer (Phase 3), from SiteHeader/SiteFooter */
	--tln-color-ghost-border: rgba(238, 240, 242, 0.55);   /* outline button and menu button on dark */
	--tln-color-ghost-hover: rgba(255, 255, 255, 0.16);
	--tln-rule-on-dark: 1px solid rgba(255, 255, 255, 0.12);
	--tln-shadow-bar: 0 6px 24px rgba(0, 0, 0, 0.22);
	--tln-shadow-menu: 0 14px 36px rgba(0, 0, 0, 0.28);
	--tln-logo-height: 60px;               /* header logo at the top of the page */
	--tln-logo-height-tight: 44px;         /* header logo once scrolled; footer logo */
	--tln-bar-pad: 36px;                   /* header padding at the top of the page */
	--tln-bar-pad-tight: 14px;             /* header padding once scrolled */
	--tln-bar-height: 132px;               /* 36 + 60 + 36: space the fixed desktop bar takes */
	--tln-bar-height-tight: 86px;          /* once scrolled: 14 + 58 (the consultation button sets the height) + 14 */
	--tln-bar-scroll: 140px;               /* scroll distance over which the bar shrinks */

	/* Page sections (Phase 4) */
	--tln-gutter: max(var(--tln-space-5), calc((100% - var(--tln-content-max)) / 2 + var(--tln-space-5))); /* side padding that keeps a full-bleed band's content in the 1180px layout */
	--tln-text-shadow-hero: 0 1px 14px rgba(30, 32, 36, 0.6); /* breadcrumb, title and intro on the inner-page header */
	--tln-overlay-brand: linear-gradient(90deg, rgba(36, 58, 94, 0.94), rgba(36, 58, 94, 0.78)); /* Midnight layer over a band's photo */

	/* Home "From the practice" mosaic (2026-11-18, design: Home - From the Practice variant) */
	--tln-text-h2-feature: 3.25rem;        /* 52px mosaic heading (38px on phones) */
	--tln-text-tile-lead: 2.25rem;         /* 36px lead tile title (28px on phones) */
	--tln-text-tile: 1.5625rem;            /* 25px other tile titles */
	--tln-overlay-tile: linear-gradient(180deg, rgba(20, 32, 52, 0) 25%, rgba(20, 32, 52, 0.55) 55%, rgba(20, 32, 52, 0.92) 100%); /* navy fade under a tile's text */
	--tln-text-shadow-tile: 0 1px 16px rgba(10, 16, 28, 0.45);
	--tln-wash-mosaic:                     /* soft band background: Calm Ocean glow top left, faint blue bottom right, on Cloud Blue (about half the design's strength, Tim, 2026-11-18) */
		radial-gradient(ellipse 70% 60% at 8% 0%, rgba(143, 182, 216, 0.16), rgba(143, 182, 216, 0) 70%),
		radial-gradient(ellipse 60% 55% at 100% 100%, rgba(44, 84, 142, 0.09), rgba(44, 84, 142, 0) 70%),
		linear-gradient(180deg, #EDF4FA 0%, #F3F7FB 50%, #EDF4FA 100%);
	--tln-radius-tile: 4px;

	/* Design update C (Tim, 2026-11-18): CSS backdrops replace the studio photo (hero-studio-bg) everywhere */
	--tln-wash-about:                      /* Home "1980s" band: blue corners and a Calm Ocean glow on Cloud Blue (about a third of the design's strength, Tim, 2026-11-18) */
		radial-gradient(ellipse 60% 55% at 0% 0%, rgba(44, 84, 142, 0.08), rgba(44, 84, 142, 0) 70%),
		radial-gradient(ellipse 70% 60% at 8% 0%, rgba(143, 182, 216, 0.11), rgba(143, 182, 216, 0) 70%),
		radial-gradient(ellipse 60% 55% at 100% 100%, rgba(44, 84, 142, 0.08), rgba(44, 84, 142, 0) 70%),
		linear-gradient(180deg, #EDF4FA 0%, #F3F7FB 50%, #EDF4FA 100%);
	--tln-backdrop-home-hero:              /* glow behind Tom, light spilling down-left, charcoal wash under the headline, bottom shade */
		radial-gradient(ellipse 56% 78% at 66% 46%, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0) 70%),
		radial-gradient(ellipse 48% 50% at 30% 96%, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0) 70%),
		linear-gradient(90deg, rgba(24, 24, 24, 0.35) 0%, rgba(24, 24, 24, 0.17) 38%, rgba(24, 24, 24, 0) 66%),
		linear-gradient(0deg, rgba(16, 16, 16, 0.38) 0%, rgba(16, 16, 16, 0) 32%),
		var(--tln-color-surface-hero);
	--tln-backdrop-home-hero-phone:        /* phones: one soft glow behind Tom and the bottom shade */
		radial-gradient(ellipse 85% 42% at 50% 24%, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0) 70%),
		linear-gradient(0deg, rgba(16, 16, 16, 0.38) 0%, rgba(16, 16, 16, 0) 32%),
		var(--tln-color-surface-hero);
	--tln-backdrop-studio:                 /* page headers: the studio photo's light in CSS, with the 30% dark layer in front */
		linear-gradient(var(--tln-color-hero-darken), var(--tln-color-hero-darken)),
		linear-gradient(0deg, rgba(22, 23, 27, 0.42) 0%, rgba(22, 23, 27, 0) 30%),
		radial-gradient(ellipse 55% 72% at 48% 32%, #4a4e53 0%, #43474b 35%, rgba(60, 63, 67, 0) 85%),
		linear-gradient(90deg, #353639 0%, #393c3f 42%, #313236 80%, #2b2c2f 100%),
		var(--tln-color-surface-hero);
	--tln-backdrop-studio-portrait:        /* About portrait panel: same light, no dark layer, centred for a tall frame */
		linear-gradient(0deg, rgba(22, 23, 27, 0.42) 0%, rgba(22, 23, 27, 0) 30%),
		radial-gradient(ellipse 70% 60% at 45% 32%, #4a4e53 0%, #43474b 35%, rgba(60, 63, 67, 0) 85%),
		linear-gradient(90deg, #353639 0%, #393c3f 42%, #313236 80%, #2b2c2f 100%),
		var(--tln-color-surface-hero);
}

@media (max-width: 860px) {
	:root {
		--tln-text-h1: 2.625rem;           /* 42px */
		--tln-text-h2: 2rem;               /* 32px */
		--tln-text-h2-feature: 2.375rem;   /* 38px */
		--tln-text-tile-lead: 1.75rem;     /* 28px */
		--tln-space-5: 1.5rem;             /* 24px side padding */
		--tln-space-6: 3.5rem;             /* 56px section padding */
		--tln-logo-height: 48px;           /* phone header logo */
		--tln-bar-pad: 20px;
		--tln-bar-height: 88px;            /* 20 + 48 + 20: the phone bar a hero reserves */
	}
}

/* Small phones (under 380px): a smaller logo keeps the logo and Menu button on one row */
@media (max-width: 379px) {
	:root {
		--tln-logo-height: 32px;
		--tln-bar-height: 88px;            /* 20 + 48 (menu button) + 20 */
	}
}
