clamp() for optimal readability across all devices.
Font Family
The entire site uses the Onest font family from Google Fonts, providing a modern, clean, and highly readable aesthetic.Font Loading
Fonts are loaded inBaseLayout.astro with optimized preconnect:
BaseLayout.astro
CSS Variables
Font family is defined in theme variables:theme.css
Fluid Typography Scale
The typography system usesclamp() for fluid scaling between mobile and desktop sizes:
Heading Styles
global.css
The
clamp() function automatically scales typography between minimum (mobile) and maximum (desktop) values based on viewport width.Typography Scale Reference
H1 - Hero Headings
Desktop: 4.5rem (72px)
Mobile: 2.8rem (44.8px)
Weight: 700
Line Height: 1.3
Mobile: 2.8rem (44.8px)
Weight: 700
Line Height: 1.3
H2 - Section Headings
Desktop: 3.5rem (56px)
Mobile: 2.2rem (35.2px)
Weight: 600
Line Height: 1.3
Mobile: 2.2rem (35.2px)
Weight: 600
Line Height: 1.3
H3 - Subsection Headings
Desktop: 2rem (32px)
Mobile: 1.5rem (24px)
Weight: 600
Line Height: 1.3
Mobile: 1.5rem (24px)
Weight: 600
Line Height: 1.3
Paragraph - Body Text
Desktop: 1.1rem (17.6px)
Line Height: 1.6
Opacity: 0.9 for subtle hierarchy
Line Height: 1.6
Opacity: 0.9 for subtle hierarchy
Font Weights
Onest supports a variable font weight range from 100-900:Available Font Weights
| Weight | Name | Usage |
|---|---|---|
| 100-300 | Thin/Light | Decorative elements |
| 400 | Regular | Body text, paragraphs |
| 500 | Medium | Buttons, subtle emphasis |
| 600 | Semibold | Headings (H2-H6) |
| 700 | Bold | Hero headings (H1) |
| 800-900 | Black | Reserved for special emphasis |
Line Heights
Optimized for readability:global.css
Text Styling
Letter Spacing
Subtle letter spacing for improved readability:global.css
Text Colors
Link Styles
global.css
Utility Classes
Text Alignment
Text Colors
Dark Theme Text
global.css
Text Reveal Animations
Typography can be animated with GSAP-powered reveal effects:global.css
Responsive Behavior
Mobile Typography
On screens below 768px:global.css
Usage Examples
Hero Section Typography
Section Headings
Dark Theme Typography
Best Practices
Use semantic HTML
Use semantic HTML
Always use proper heading hierarchy (H1 → H2 → H3) for accessibility and SEO
Leverage fluid typography
Leverage fluid typography
Use the
clamp() values defined in global.css instead of creating custom responsive sizesMaintain contrast
Maintain contrast
Ensure sufficient contrast between text and background colors, especially with
opacity: 0.9 on paragraphsTest on real devices
Test on real devices
Verify typography renders correctly on actual mobile devices, not just browser dev tools
Use text-wrap: balance
Use text-wrap: balance
The global
text-wrap: balance setting improves text layout—avoid overriding unless necessaryRelated Resources
Theme System
Learn about color variables and theming
Animations
Add text reveal animations