/* AC Hi-Fi Design System
===========================================================
Palette, typography, and shared primitives for hi-fi pages.
Pulled from the reference screens you shared:
- Deep forest/teal background (dark mode editorial)
- Mustard / saffron accent
- Cream paper for light sections
- Ink black
- Source Serif 4 + Instrument Serif italic for display
- Geist for sans body
- JetBrains Mono for labels
*/
/* Inject shared keyframes + transitions once */
(function() {
if (document.getElementById('ac-kit-styles')) return;
const s = document.createElement('style');
s.id = 'ac-kit-styles';
s.textContent = '@keyframes ac-marquee { 0% { transform:translateX(0); } 100% { transform:translateX(-50%); } }';
document.head.appendChild(s);
})();
const AC = {
// Color
ink: '#0f1410',
paper: '#f4efe4',
paperWarm: '#ebe3d2',
forest: '#1d2b25', // hero dark
forestDeep: '#121a16',
forestLine: '#2a3a32',
gold: '#c9a23a',
goldLight: '#e4cf6b',
cream: '#f9f5ec',
rule: '#d8d1bf',
muted: '#6b6555',
mutedOnDark: 'rgba(244, 239, 228, 0.55)',
ruleDark: 'rgba(244, 239, 228, 0.14)',
// Type
serif: '"Source Serif 4", "Source Serif Pro", Georgia, serif',
serifItalic: '"Instrument Serif", "Source Serif 4", Georgia, serif',
sans: '"Geist", "Söhne", system-ui, -apple-system, sans-serif',
mono: '"JetBrains Mono", ui-monospace, monospace',
};
/* Eyebrow — small uppercase mono label */
function Eyebrow({ children, color, style = {} }) {
return (
{/* film grain */}
")`,
opacity: 0.55,
mixBlendMode: 'overlay',
pointerEvents: 'none',
}} />
{/* vignette */}
{/* subject label — small mono in corner, like a plate caption */}
◆ Plate · {subject}
{overlay}
);
}
/* Tag pill — small uppercase chip */
function Tag({ children, variant = 'cream', style = {} }) {
const variants = {
cream: { bg: 'rgba(244, 239, 228, 0.92)', fg: AC.ink },
gold: { bg: AC.gold, fg: AC.ink },
forest: { bg: AC.forest, fg: AC.paper },
outline: { bg: 'transparent', fg: AC.ink, border: `1px solid ${AC.ink}` },
outlineLight: { bg: 'transparent', fg: AC.paper, border: '1px solid rgba(244,239,228,0.4)' },
};
const v = variants[variant] || variants.cream;
return (
{children}
);
}
/* Breakpoint hook — re-renders on resize */
function useBreakpoint() {
const [width, setWidth] = React.useState(window.innerWidth);
React.useEffect(() => {
const handler = () => setWidth(window.innerWidth);
window.addEventListener('resize', handler);
return () => window.removeEventListener('resize', handler);
}, []);
return { isMobile: width < 768, width };
}
/* NavItem — single nav link with hover underline */
const NAV_HREFS = {
'Portfolio': 'portfolio.html',
'Track Record': 'track-record.html',
'Network': 'network.html',
'Case Studies': 'case-studies.html',
'About': 'about.html',
};
function NavItem({ label, active, fg }) {
const [hovered, setHovered] = React.useState(false);
const showUnderline = active || hovered;
return (
setHovered(true)}
onMouseLeave={() => setHovered(false)}
style={{
textDecoration: 'none',
color: 'inherit',
opacity: active ? 1 : (hovered ? 1 : 0.75),
borderBottom: showUnderline ? `1px solid ${fg}` : '1px solid transparent',
paddingBottom: 4,
cursor: 'pointer',
transition: 'opacity 0.15s, border-color 0.15s',
}}>{label}
);
}
/* Nav bar — sticky, collapses to hamburger on mobile */
function HiFiNav({ active = 'Home', onDark = false }) {
const items = ['Portfolio', 'Track Record', 'Network', 'Case Studies', 'About'];
const fg = onDark ? AC.paper : AC.ink;
const ruleColor = onDark ? 'rgba(244,239,228,0.18)' : AC.rule;
const [btnHovered, setBtnHovered] = React.useState(false);
const [menuOpen, setMenuOpen] = React.useState(false);
const { isMobile } = useBreakpoint();
return (
Alessandro Cordano
{!isMobile && (
{items.map((i) => (
))}
)}
{isMobile ? (
) : (
setBtnHovered(true)}
onMouseLeave={() => setBtnHovered(false)}
style={{
display: 'inline-block',
textDecoration: 'none',
background: btnHovered ? AC.forest : AC.gold,
color: btnHovered ? AC.gold : AC.ink,
border: btnHovered ? `1px solid ${AC.gold}` : '1px solid transparent',
padding: '12px 18px',
fontFamily: AC.sans,
fontSize: 11,
letterSpacing: '0.14em',
textTransform: 'uppercase',
fontWeight: 600,
cursor: 'pointer',
transition: 'background 0.18s, color 0.18s, border-color 0.18s',
}}>Book a Call
)}
{isMobile && menuOpen && (
{items.map((item) => (
{item}
))}
Book a Call →
)}
);
}
/* Marquee strip — static or animated brand band */
function MarqueeStrip({ items, variant = 'forest', animated = false }) {
const isForest = variant === 'forest';
const bg = isForest ? AC.forest : AC.gold;
const fg = isForest ? AC.paper : AC.ink;
const duration = `${Math.max(items.length * 4, 16)}s`;
if (!animated) {
return (
{items.map((it, i) => (
{it}
{i < items.length - 1 && ◆}
))}
);
}
/* Animated: duplicate items so translateX(-50%) loops seamlessly */
const doubled = [...items, ...items];
return (
{doubled.map((it, i) => (
{it}
◆
))}
);
}
/* FooterLink — footer nav item with gold hover */
function FooterLink({ children, href }) {
const [hovered, setHovered] = React.useState(false);
const Tag = href ? 'a' : 'span';
return (
setHovered(true)}
onMouseLeave={() => setHovered(false)}
style={{
color: hovered ? AC.gold : 'rgba(244,239,228,0.85)',
transition: 'color 0.18s',
cursor: 'pointer',
textDecoration: 'none',
}}>
{children}
);
}
/* Footer */
function HiFiFooter() {
const { isMobile } = useBreakpoint();
return (
);
}
/* Stat — number with optional gold suffix and uppercase mono label.
Used for network previews, dashboards, sidebar metrics. */
function Stat({ value, suffix, label, size = 48, color, style = {} }) {
return (
{value}
{suffix && {suffix}}
{label}
);
}
/* StatTile — proof/audit card with square indicator, index mark, and note.
Used for performance and credibility grids. */
function StatTile({ value, label, note, index, filled = false, style = {} }) {
const [hovered, setHovered] = React.useState(false);
return (
setHovered(true)}
onMouseLeave={() => setHovered(false)}
style={{ background: AC.cream, padding: '32px 28px', position: 'relative', ...style }}>
{index != null && (
{String(index).padStart(2, '0')}
)}
{value}
{label}
{note && (
{note}
)}
);
}
/* TextLink — uppercase mono editorial link with bottom rule. */
function TextLink({ children, color, style = {} }) {
return (
{children}
);
}
/* Subhead — serif heading at category / sub-section scale. */
function Subhead({ children, size = 26, color, style = {} }) {
return (
{children}
);
}
/* NetworkMap — editorial SVG world map for the Network page. */
function NetworkMap() {
const W = 1168, H = 360;
const lonMin = -120, lonMax = 160, latMax = 70, latMin = -50;
const toX = lon => ((lon - lonMin) / (lonMax - lonMin)) * W;
const toY = lat => ((latMax - lat) / (latMax - latMin)) * H;
// Rough landmass polygons — editorial sketch
const lands = [
// North America
[[0,30],[209,15],[271,75],[167,135],[125,165],[0,150]],
// South America
[[167,174],[229,195],[292,225],[312,270],[209,360],[167,330],[146,270],[167,174]],
// Europe
[[459,0],[626,0],[667,45],[646,105],[605,105],[542,96],[459,90],[459,0]],
// Africa
[[417,105],[730,165],[730,210],[709,315],[584,315],[417,165],[417,105]],
// Asia
[[750,0],[1084,0],[1104,30],[1104,105],[1000,150],[917,195],[834,186],[750,135],[688,90],[730,15],[750,0]],
// Australia
[[980,270],[1147,270],[1147,330],[980,330],[980,270]],
];
const origins = [
{ id: 'peru', lon: -77, lat: -12, label: 'Peru' },
{ id: 'chile', lon: -71, lat: -33, label: 'Chile' },
{ id: 'egypt', lon: 30, lat: 31, label: 'Egypt' },
];
const markets = [
{ id: 'eu', lon: 8, lat: 51, label: 'EU' },
{ id: 'mena', lon: 55, lat: 25, label: 'MENA' },
{ id: 'taiwan', lon: 121, lat: 25, label: 'Taiwan' },
];
const nodeMap = {};
[...origins, ...markets].forEach(n => { nodeMap[n.id] = n; });
const connections = [
['peru','eu'],['peru','taiwan'],
['chile','eu'],['chile','mena'],
['egypt','eu'],['egypt','mena'],['egypt','taiwan'],
];
return (
);
}
Object.assign(window, {
AC, Eyebrow, Display, I, Body, GoldButton, GhostButton, HiFiImage,
Tag, HiFiNav, MarqueeStrip, HiFiFooter, useBreakpoint,
Stat, StatTile, TextLink, Subhead, NetworkMap,
});