/*
 * HTL Villach - colour system.
 *
 * Single source of truth for every brand colour. The values come from the
 * colour concept: two main colours plus six department colours, one of which
 * (Kobalt) is shared by Informatik and Informatik & Management.
 *
 * A variable is published to Elementor by the comment behind it: any comment
 * whose text starts with "@elementor" turns the variable into a global colour,
 * and the rest of the comment becomes its label - see the declarations below.
 *
 * inc/htlv-colors.php reads this file, and every variable carrying the marker
 * shows up as a global colour in Elementor's colour pickers under the given
 * label. Change a value here and the picker follows on the next admin request;
 * there is no second place to keep in sync.
 *
 * TONAL STEPS
 *
 * A colour marked "@scale" additionally gets two derived steps, calculated in
 * inc/htlv-color-math.php and injected as css variables of their own:
 *
 *   --htlv-hochbau-dunkel   large areas with white text (header, hero, footer,
 *                           filled buttons) - always 10:1 against white
 *   --htlv-hochbau-hell     light surfaces with dark text (badges, table rows,
 *                           callouts) - always 12:1 against HTL Schwarz
 *
 * They are not stored here because they are derived: change the base colour
 * and both steps follow. They do show up in Elementor like every other colour.
 *
 * Why the steps exist: the concept's colours were chosen for identity, not for
 * contrast, and range from 3.4:1 (Innenarchitektur) to 7.5:1 (Informatik)
 * against white. Used raw on a large surface, one department reads bright and
 * another dark. The steps are solved for a fixed contrast instead, so every
 * department lands on the same readability while keeping its own hue.
 */

:root {
	/* ---------- main colours ---------- */

	/* Yellow is a black-text colour by nature, black is the text colour - so
	   neither of them gets a tonal scale. */
	--htlv-gelb: #FFE843;        /* @elementor HTL Gelb */
	--htlv-schwarz: #1A1814;     /* @elementor HTL Schwarz */

	/* ---------- department colours ---------- */

	/* Kobalt - Informatik and Informatik & Management share it on purpose:
	   same discipline, different focus. */
	--htlv-informatik: #1A48C8;       /* @elementor Informatik @scale */
	--htlv-medientechnik: #7A1EC8;    /* @elementor Medientechnik @scale */
	--htlv-cybersecurity: #D42030;    /* @elementor Cybersecurity @scale */
	--htlv-hochbau: #1E7A2C;          /* @elementor Hochbau @scale */
	--htlv-tiefbau: #0E7E96;          /* @elementor Tiefbau @scale */
	--htlv-innenarchitektur: #D4700A; /* @elementor Innenarchitektur @scale */
	--htlv-netzwerktechnik: #AC2B98; /* @elementor Netzwerktechnik @scale */

	/*
	 * The colour of the department the visitor is currently in. Set per page by
	 * the body class below, so a component can just use var(--htlv-abteilung)
	 * instead of knowing which department it sits on. Falls back to the main
	 * colours on pages that belong to no department.
	 */
	--htlv-abteilung: var(--htlv-gelb);
	--htlv-abteilung-dunkel: var(--htlv-schwarz);
	--htlv-abteilung-hell: var(--htlv-gelb);
}

/* ---------- per department ---------- */

/*
 * inc/htlv-colors.php puts htlv-dep-<slug> on the body, using the same slug
 * resolution as the hero shapes: sub pages inherit from their top level
 * ancestor.
 */

.htlv-dep-informatik,
.htlv-dep-informatik-management {
	--htlv-abteilung: var(--htlv-informatik);
	--htlv-abteilung-dunkel: var(--htlv-informatik-dunkel);
	--htlv-abteilung-hell: var(--htlv-informatik-hell);
}

.htlv-dep-medientechnik {
	--htlv-abteilung: var(--htlv-medientechnik);
	--htlv-abteilung-dunkel: var(--htlv-medientechnik-dunkel);
	--htlv-abteilung-hell: var(--htlv-medientechnik-hell);
}

.htlv-dep-cybersecurity {
	--htlv-abteilung: var(--htlv-cybersecurity);
	--htlv-abteilung-dunkel: var(--htlv-cybersecurity-dunkel);
	--htlv-abteilung-hell: var(--htlv-cybersecurity-hell);
}

.htlv-dep-hochbau {
	--htlv-abteilung: var(--htlv-hochbau);
	--htlv-abteilung-dunkel: var(--htlv-hochbau-dunkel);
	--htlv-abteilung-hell: var(--htlv-hochbau-hell);
}

.htlv-dep-tiefbau {
	--htlv-abteilung: var(--htlv-tiefbau);
	--htlv-abteilung-dunkel: var(--htlv-tiefbau-dunkel);
	--htlv-abteilung-hell: var(--htlv-tiefbau-hell);
}

.htlv-dep-innenarchitektur {
	--htlv-abteilung: var(--htlv-innenarchitektur);
	--htlv-abteilung-dunkel: var(--htlv-innenarchitektur-dunkel);
	--htlv-abteilung-hell: var(--htlv-innenarchitektur-hell);
}

.htlv-dep-netzwerktechnik {
	--htlv-abteilung: var(--htlv-netzwerktechnik);
	--htlv-abteilung-dunkel: var(--htlv-netzwerktechnik-dunkel);
	--htlv-abteilung-hell: var(--htlv-netzwerktechnik-hell);
}