/*
 * AYATOP design tokens (PS-01.15)
 * Naming: --ak-{group}-{role}-{variant}
 * Colour values are DRAFT evaluation directions (PS-01.5): nothing here is the approved palette.
 * Direction A is the default; B and C are switched with data-ak-direction on <html>.
 * Only colour tokens differ between directions; every other token is shared.
 */

/* AYATOP fonts (design blueprint): Cormorant Garamond for headings, Manrope for text, navigation and buttons.
 * Variable fonts, Latin subset, self-hosted (UK GDPR: no request to Google). Both are SIL Open Font License,
 * licence texts are in assets/fonts. */
@font-face {
	font-family: "Cormorant Garamond";
	src: url("../fonts/cormorant-garamond-variable.woff") format("woff");
	font-weight: 300 700;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: "Manrope";
	src: url("../fonts/manrope-variable.woff") format("woff");
	font-weight: 200 800;
	font-style: normal;
	font-display: swap;
}

:root {
	/* ---------- Colour: Direction A, AYATOP 2027 (warm ivory + charcoal + forest green) ---------- */
	--ak-color-canvas-primary: #f6f5f1;
	--ak-color-canvas-secondary: #eae8e1;
	--ak-color-surface-default: #ffffff;

	--ak-color-text-primary: #20211f;
	--ak-color-text-secondary: #45463f;
	--ak-color-text-muted: #5e5f58;
	--ak-color-text-on-interactive: #ffffff;

	--ak-color-brand-primary: #161616; /* luxury black */
	--ak-color-accent: #161616;
	--ak-color-sale: #824b50; /* meaningful colour only: Sale badge */
	--ak-color-stone-warm: #e6e2d6;

	--ak-color-border-subtle: #dedcd6;
	--ak-color-border-strong: #7b7d74; /* inputs and component edges, 3:1+ against canvas */

	--ak-color-interactive-primary: #161616;
	--ak-color-interactive-primary-hover: #3a3936;

	--ak-color-focus-ring: #161616;

	--ak-color-success: #1b6b43;
	--ak-color-warning: #7a4f00;
	--ak-color-error: #b3261e;

	--ak-color-overlay: rgb(32 33 31 / 0.5);

	/* Tonal sample-art tints (design preview only) */
	--ak-tint-1: #d9d6cb; --ak-tint-2: #d4d2cb; --ak-tint-3: #e2dcce; --ak-tint-4: #cfcdc6; --ak-tint-5: #d6d1c5;

	/* ---------- Typography (PS-01.6) ----------
	 * Blueprint fonts: Cormorant Garamond (display, headings) and Manrope (body, UI), self-hosted. */
	--ak-font-display: "Cormorant Garamond", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
	--ak-font-heading: var(--ak-font-display);
	--ak-font-body: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--ak-font-ui: var(--ak-font-body);

	--ak-weight-regular: 400;
	--ak-weight-medium: 540;
	--ak-weight-bold: 640;
	--ak-weight-display: 500;

	/* Fluid type scale (min, preferred, max). Provisional until visual testing. */
	--ak-type-display: clamp(2.5rem, 1.5rem + 3.2vw, 4.25rem);
	--ak-type-h1: clamp(2.25rem, 1.7rem + 2.4vw, 3.5rem);
	--ak-type-h2: clamp(1.875rem, 1.5rem + 1.4vw, 2.625rem);
	--ak-type-h3: clamp(1.5rem, 1.3rem + 0.8vw, 2rem);
	--ak-type-h4: 1.25rem;
	--ak-type-h5: 1.125rem;
	--ak-type-h6: 1rem;
	--ak-type-body-large: 1.125rem;
	--ak-type-body: 1rem;
	--ak-type-body-small: 0.875rem;
	--ak-type-nav: 0.9375rem;
	--ak-type-label: 0.875rem;
	--ak-type-meta: 0.8125rem;
	--ak-type-price: 1rem;
	--ak-type-button: 0.9375rem;

	--ak-leading-tight: 1.15;
	--ak-leading-heading: 1.25;
	--ak-leading-body: 1.6;
	--ak-leading-serif-body: 1.7;

	--ak-measure-reading: 68ch; /* keeps lines under ~80 characters */

	/* ---------- Spacing scale (PS-01.8) ---------- */
	--ak-space-1: 0.25rem;
	--ak-space-2: 0.5rem;
	--ak-space-3: 0.75rem;
	--ak-space-4: 1rem;
	--ak-space-5: 1.5rem;
	--ak-space-6: 2rem;
	--ak-space-7: 3rem;
	--ak-space-8: 4rem;
	--ak-space-9: 6rem;
	--ak-space-10: 8rem;

	--ak-space-micro: var(--ak-space-2);
	--ak-space-component: var(--ak-space-4);
	--ak-space-content: var(--ak-space-6);
	--ak-space-section: 3.25rem; /* blueprint: 52px on phones, 88px on desktop */
	--ak-space-section-major: clamp(4rem, 3rem + 6vw, 8rem);

	/* ---------- Layout (provisional, to be fixed after viewport testing) ---------- */
	--ak-page-gutter: clamp(1.125rem, 4.2vw, 3.75rem);
	--ak-width-max: 90rem;
	--ak-width-content: 75rem;
	--ak-width-reading: 44rem;
	--ak-target-min: 2.75rem; /* 44px touch target */

	/* ---------- Shape and depth ---------- */
	--ak-radius-control: 4px;
	--ak-radius-badge: 2px;
	--ak-radius-media: 0;
	--ak-border-width: 1px;
	--ak-border-width-emphasis: 2px;
	--ak-shadow-overlay: 0 12px 32px rgb(32 33 31 / 0.14);

	/* ---------- Motion (PS-01.10) ---------- */
	--ak-motion-duration-fast: 120ms;
	--ak-motion-duration-standard: 200ms;
	--ak-motion-duration-slow: 320ms;
	--ak-motion-ease-standard: cubic-bezier(0.2, 0, 0, 1);

	/* ---------- Layering ---------- */
	--ak-z-header: 100;
	--ak-z-dropdown: 200;
	--ak-z-overlay: 300;
	--ak-z-drawer: 400;
	--ak-z-modal: 500;
	--ak-z-skip-link: 1000;
}

@media (min-width: 64rem) {
	:root { --ak-space-section: 5.5rem; }
}

/* ---------- Direction B, "Thames blue" (cool blue-grey + sea-glass) ---------- */
html[data-ak-direction="b"] {
	--ak-color-canvas-primary: #f5f7f9;
	--ak-color-canvas-secondary: #e6ebf0;
	--ak-color-text-primary: #0e1b2b;
	--ak-color-text-secondary: #3a4859;
	--ak-color-text-muted: #566577;
	--ak-color-brand-primary: #12263f;
	--ak-color-accent: #23706a;
	--ak-color-border-subtle: #cbd3dc;
	--ak-color-border-strong: #6b7a8a;
	--ak-color-interactive-primary: #12263f;
	--ak-color-interactive-primary-hover: #1e3a5c;
	--ak-color-overlay: rgb(14 27 43 / 0.5);
}

/* ---------- Direction C, "Bottle green" (green-grey + heather) ---------- */
html[data-ak-direction="c"] {
	--ak-color-canvas-primary: #f0f2ee;
	--ak-color-canvas-secondary: #e2e6df;
	--ak-color-text-primary: #101714;
	--ak-color-text-secondary: #3b4640;
	--ak-color-text-muted: #56625b;
	--ak-color-brand-primary: #123b2e;
	--ak-color-accent: #6b4a7a;
	--ak-color-border-subtle: #c9cfc5;
	--ak-color-border-strong: #6c776a;
	--ak-color-interactive-primary: #123b2e;
	--ak-color-interactive-primary-hover: #1b5240;
	--ak-color-overlay: rgb(16 23 20 / 0.5);
}

/* ---------- Reduced motion: all durations collapse ---------- */
@media (prefers-reduced-motion: reduce) {
	:root {
		--ak-motion-duration-fast: 0.01ms;
		--ak-motion-duration-standard: 0.01ms;
		--ak-motion-duration-slow: 0.01ms;
	}
}
