/*
 * Self-hosted replacements for the prototype's 3 CDN dependencies (Fontshare,
 * Google Fonts, and the @phosphor-icons/web <script> bundle). Self-hosting
 * is mandatory here, not a style preference: Phosphor's unpkg build injects
 * its @font-face into the OUTER document at runtime — the block editor's
 * iframed canvas has its own document, so those icons would simply be
 * absent from the editor. Self-hosting also removes 3 external origins,
 * works offline, and avoids FOIT differences between canvas and frontend.
 * Both Fontshare's and Google Fonts' licences permit self-hosting.
 *
 * Only the ~20 Phosphor glyphs actually used across the design are kept
 * (the full icon set is 1200+ rules) — see docs in README below each block.
 */

@font-face {
	font-family: 'General Sans';
	src: url('../fonts/GeneralSans-Regular.woff2') format('woff2');
	font-weight: 400;
	font-style: normal;
	font-display: swap;
}
@font-face {
	font-family: 'General Sans';
	src: url('../fonts/GeneralSans-Medium.woff2') format('woff2');
	font-weight: 500;
	font-style: normal;
	font-display: swap;
}
@font-face {
	font-family: 'General Sans';
	src: url('../fonts/GeneralSans-SemiBold.woff2') format('woff2');
	font-weight: 600;
	font-style: normal;
	font-display: swap;
}

/* Geist is shipped as a variable font — Google serves one file covering the
   500-700 weight range regardless of which discrete weight is requested, so
   one @font-face with a weight range is correct here (not a missing file). */
@font-face {
	font-family: 'Geist';
	src: url('../fonts/Geist-latin-500.woff2') format('woff2');
	font-weight: 500 700;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: 'Phosphor';
	src: url('../fonts/Phosphor.woff2') format('woff2');
	font-weight: normal;
	font-style: normal;
	font-display: block;
}

.ph {
	font-family: 'Phosphor' !important;
	speak: never;
	font-style: normal;
	font-weight: normal;
	font-variant: normal;
	text-transform: none;
	line-height: 1;
	letter-spacing: 0;
	-webkit-font-feature-settings: "liga";
	-moz-font-feature-settings: "liga";
	font-feature-settings: "liga";
	-webkit-font-variant-ligatures: discretionary-ligatures;
	font-variant-ligatures: discretionary-ligatures;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

/* Icons actually used. Phosphor.woff2 above is the FULL font, not a subset —
   only these rules are trimmed from Phosphor's own 1200+ rule stylesheet, so
   adding an icon is a one-line change here (plus an entry in
   asta_core_allowed_icons(), inc/assets.php, which gates it server-side).
   Codepoints are taken verbatim from @phosphor-icons/web's own style.css —
   never guessed: a wrong value renders a plausible WRONG glyph rather than
   failing, so it can ship unnoticed.

   header/nav (caret-down, calculator, package, map-pin-line, list, x,
   arrow-right), footer (phone, envelope-simple), order form (plus-circle),
   track shipment (airplane-tilt, truck, arrow-square-out),
   why-us (globe, share-network, truck, eye, tag, medal, clock, headset),
   commitment (handshake, seal-check, users-three),
   services cards (globe, magnifying-glass, file-text, stamp, truck,
   flow-arrow, airplane-tilt, clipboard-text, anchor, users-three, package,
   shopping-cart-simple, address-book, handshake, trend-up). */
.ph.ph-caret-down:before { content: "\e136"; }
.ph.ph-calculator:before { content: "\e538"; }
.ph.ph-package:before { content: "\e390"; }
.ph.ph-arrow-right:before { content: "\e06c"; }
.ph.ph-list:before { content: "\e2f0"; }
.ph.ph-x:before { content: "\e4f6"; }
.ph.ph-phone:before { content: "\e3b8"; }
.ph.ph-envelope-simple:before { content: "\e218"; }
.ph.ph-plus-circle:before { content: "\e3d6"; }
.ph.ph-globe:before { content: "\e288"; }
.ph.ph-share-network:before { content: "\e408"; }
.ph.ph-truck:before { content: "\e4b4"; }
.ph.ph-eye:before { content: "\e220"; }
.ph.ph-tag:before { content: "\e478"; }
.ph.ph-medal:before { content: "\e320"; }
.ph.ph-clock:before { content: "\e19a"; }
.ph.ph-headset:before { content: "\e584"; }
.ph.ph-handshake:before { content: "\e582"; }
.ph.ph-seal-check:before { content: "\e606"; }
.ph.ph-users-three:before { content: "\e68e"; }
.ph.ph-map-pin-line:before { content: "\e318"; }
.ph.ph-arrow-square-out:before { content: "\e5de"; }
.ph.ph-magnifying-glass:before { content: "\e30c"; }
.ph.ph-file-text:before { content: "\e23a"; }
.ph.ph-stamp:before { content: "\ea48"; }
.ph.ph-flow-arrow:before { content: "\e6ec"; }
.ph.ph-airplane-tilt:before { content: "\e5d6"; }
.ph.ph-clipboard-text:before { content: "\e198"; }
.ph.ph-anchor:before { content: "\e514"; }
.ph.ph-shopping-cart-simple:before { content: "\e420"; }
.ph.ph-address-book:before { content: "\e6f8"; }
.ph.ph-trend-up:before { content: "\e4ae"; }
