/*
 * Design tokens — Naccarato Insurance
 *
 * Single source of truth for the visual system. Components must never hardcode
 * a color, size or spacing value: they consume the semantic tokens below.
 *
 * Color and type values are extracted from the client design files in
 * Docs/Designs/wetransfer_naccarato-new-website_2026-08-31_1835/ (1366px canvas),
 * not eyeballed. See instructions/Task002.md for the extraction method.
 */

:root {
	/* ---------------------------------------------------------------
	 * Brand palette
	 * --------------------------------------------------------------- */
	--nac-burgundy: #6d1824;
	--nac-gold: #c1923b;
	--nac-gold-light: #cfa940;
	/*
	 * Top-level menu only. Measured off "NACC - MAIN NAVEGATION WEB D" (Task 013):
	 * the same JPG gives #6d1525 for the logo and icons, so this is a colour of
	 * its own, not a shifted --nac-burgundy. The brand burgundy is unchanged.
	 */
	--nac-burgundy-nav: #722724;

	/* ---------------------------------------------------------------
	 * Neutrals
	 * --------------------------------------------------------------- */
	--nac-black: #1a171b;        /* rich black used for body copy */
	--nac-black-pure: #000000;   /* display headings only */
	--nac-gray-600: #56545a;     /* derived: muted/secondary text */
	--nac-gray-300: #d1d1d3;     /* stronger dividers */
	--nac-gray-200: #e6e6e7;     /* soft borders */
	--nac-gray-100: #f4f4f4;     /* section bands */
	--nac-off-white: #fcfcfc;
	--nac-white: #ffffff;

	/* ---------------------------------------------------------------
	 * Status (forms)
	 *
	 * DERIVED, not measured: the design has no validation states. Picked
	 * for contrast on white (error 6.5:1, success 5.3:1; both >= 4.9:1 on
	 * their tinted backgrounds) and so the error red cannot be mistaken
	 * for the brand burgundy. Open to the designer's correction. Task012.
	 * --------------------------------------------------------------- */
	--nac-red: #b3261e;
	--nac-red-tint: #fdf3f2;
	--nac-green: #1d7a4b;
	--nac-green-tint: #f1f8f4;

	/* ---------------------------------------------------------------
	 * Semantic colors — components use these, never the brand tokens
	 * --------------------------------------------------------------- */
	--color-text: var(--nac-black);
	--color-text-muted: var(--nac-gray-600);
	--color-heading: var(--nac-black-pure);
	--color-bg: var(--nac-white);
	--color-bg-alt: var(--nac-gray-100);
	--color-bg-subtle: var(--nac-off-white);
	--color-bg-footer: var(--nac-gray-300);   /* the design puts the whole footer on this band */
	/*
	 * Area outside the page frame. The exhibits use plain white, so the sheet
	 * is separated from its surroundings by the shadow alone; kept as its own
	 * token in case that separation needs strengthening.
	 */
	--color-frame-outside: var(--nac-white);
	--color-primary: var(--nac-burgundy);
	--color-accent: var(--nac-gold);
	--color-accent-hover: var(--nac-gold-light);
	--color-nav: var(--nac-burgundy-nav);
	--color-nav-active: var(--nac-gold-light);   /* the art measures #cfa83f */
	--color-border: var(--nac-gray-200);
	--color-border-strong: var(--nac-gray-300);
	--color-on-primary: var(--nac-white);
	--color-on-accent: var(--nac-white);
	--color-focus: var(--nac-gold);
	--color-error: var(--nac-red);
	--color-error-bg: var(--nac-red-tint);
	--color-success: var(--nac-green);
	--color-success-bg: var(--nac-green-tint);

	/* ---------------------------------------------------------------
	 * Typography
	 *
	 * Inter  — display headings (uppercase, heavy weights)
	 * Barlow — body copy, navigation, buttons
	 * --------------------------------------------------------------- */
	--font-display: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
	--font-body: "Barlow", system-ui, -apple-system, "Segoe UI", sans-serif;

	--fw-regular: 400;
	--fw-medium: 500;
	--fw-semibold: 600;
	--fw-bold: 700;
	--fw-extrabold: 800;
	--fw-black: 900;

	/*
	 * Fluid type scale.
	 *
	 * Scaled against --frame-width, NOT vw. The page is a bounded 1300px
	 * sheet, so sizing type against the viewport would grow it on a wide
	 * monitor while the page it sits in stays the same width. Each factor is
	 * simply (target size ÷ 1300), which makes every maximum land exactly on
	 * the size measured in the design once the frame is at full width.
	 */
	--fs-hero: clamp(2.75rem, calc(var(--frame-width) * 0.0915), 7.4375rem);  /*  44 → 119px  page hero */
	--fs-h1: clamp(2.25rem, calc(var(--frame-width) * 0.0646), 5.25rem);      /*  36 →  84px  section titles */
	--fs-h2: clamp(2rem, calc(var(--frame-width) * 0.0492), 4rem);            /*  32 →  64px */
	--fs-h3: clamp(1.75rem, calc(var(--frame-width) * 0.04), 3.25rem);        /*  28 →  52px */
	--fs-h4: clamp(1.375rem, calc(var(--frame-width) * 0.0246), 2rem);        /*  22 →  32px */
	--fs-h5: clamp(1.25rem, calc(var(--frame-width) * 0.0192), 1.5625rem);    /*  20 →  25px */
	--fs-lg: clamp(1.125rem, calc(var(--frame-width) * 0.0169), 1.375rem);    /*  18 →  22px  lead paragraphs */
	--fs-body: clamp(1.0625rem, calc(var(--frame-width) * 0.0154), 1.25rem);  /*  17 →  20px  body copy */
	--fs-sm: clamp(1rem, calc(var(--frame-width) * 0.0138), 1.125rem);        /*  16 →  18px */
	--fs-xs: clamp(0.8125rem, calc(var(--frame-width) * 0.0115), 0.9375rem);  /*  13 →  15px  legal/footer */
	/*
	 * Top-level menu: 15.5px at 1300 (Task 013 art), 13px at a 1024 frame.
	 * Derived from --fs-body rather than from the frame because the previous
	 * menu was set in --fs-body, and the logo beside it is sized by the space
	 * the menu leaves: tracking the old size keeps the menu's footprint, and
	 * with it the logo, where it was at every width.
	 */
	--fs-nav: calc(var(--fs-body) * 0.85 - 1.5px);

	--lh-tight: 1.05;   /* display headings */
	--lh-heading: 1.2;
	--lh-body: 1.6;
	--lh-loose: 1.75;

	--ls-display: -0.02em;  /* heavy uppercase headings tighten slightly */
	--ls-wide: 0.08em;      /* small caps labels, buttons */

	/* ---------------------------------------------------------------
	 * Spacing — 4px base scale
	 * --------------------------------------------------------------- */
	--space-1: 0.25rem;   /*   4px */
	--space-2: 0.5rem;    /*   8px */
	--space-3: 0.75rem;   /*  12px */
	--space-4: 1rem;      /*  16px */
	--space-5: 1.25rem;   /*  20px */
	--space-6: 1.5rem;    /*  24px */
	--space-8: 2rem;      /*  32px */
	--space-10: 2.5rem;   /*  40px */
	--space-12: 3rem;     /*  48px */
	--space-16: 4rem;     /*  64px */
	--space-20: 5rem;     /*  80px */
	--space-24: 6rem;     /*  96px */

	/* Air on each side of a top-level menu divider: 13px at 1300, scaled with the type. */
	--nav-item-pad: calc(var(--fs-nav) * 0.8387);

	/* Vertical rhythm between full-width page sections */
	--section-gap: clamp(var(--space-12), 7vw, var(--space-24));

	/* ---------------------------------------------------------------
	 * Radii & shadows
	 * --------------------------------------------------------------- */
	--radius-sm: 4px;
	--radius-md: 8px;
	--radius-pill: 999px;   /* CTA buttons in the design are pill-shaped */

	--shadow-sm: 0 1px 3px rgba(26, 23, 27, 0.12);
	--shadow-md: 0 6px 20px rgba(26, 23, 27, 0.14);

	/* ---------------------------------------------------------------
	 * Layout
	 *
	 * Derived from element positions on the 1366px design canvas:
	 * homepage content runs x≈135→1241, subpage text column x≈207→1160.
	 * --------------------------------------------------------------- */
	/*
	 * Two widths, on purpose (client request 2026-10-23, replacing the 1300px
	 * sheet with drop shadow of the design exhibits):
	 *
	 *   --page-max   the page itself: body, header, hero, bands and footer run
	 *                edge to edge up to this, then stay centred. 1920px because
	 *                the subpage hero photos are ~1822px wide and the hero
	 *                videos 1280px, so more would only blur them.
	 *   --frame-max  the art frame, kept at 1300px. Type, hero overlays and
	 *                every proportion measured from the art are sized against
	 *                --frame-width, so they stay as designed and the content
	 *                keeps its column while the backgrounds widen.
	 */
	--page-max: 1920px;
	--page-width: min(100vw, var(--page-max));
	--frame-max: 1300px;
	--frame-width: min(100vw, var(--frame-max));

	--container-max: 1140px;      /* default content width — measured 1146px */
	--container-narrow: 950px;    /* long-form text (insurance subpages) */
	--gutter: clamp(var(--space-4), 4vw, var(--space-10));

	/* ---------------------------------------------------------------
	 * Motion & layering
	 * --------------------------------------------------------------- */
	--transition-fast: 150ms ease;
	--transition-base: 250ms ease;

	--z-dropdown: 100;
	--z-header: 200;
	--z-overlay: 300;
}

/*
 * Breakpoints (min-width, mobile-first). Custom properties can't be used
 * inside @media, so these are a documented convention — write the literal:
 *
 *   sm  576px    md  768px    lg 1024px    xl 1280px
 */

@media (prefers-reduced-motion: reduce) {
	:root {
		--transition-fast: 0ms;
		--transition-base: 0ms;
	}
}
