Design — Metuo HTML
Metuo’s HTML pages are styled with Tailwind CSS classes and a few colour, font and breakpoint tokens; a new colour or font needs a CSS rebuild.
How the styling works
Section titled “How the styling works”The pages are styled with Tailwind CSS classes written in the HTML
(class="flex flex-col gap-2.5 text-grey"). assets/css/style.css contains exactly the classes the pages use,
generated from src/css/style.css.
That means two kinds of change:
| Change | Rebuild the stylesheet? |
|---|---|
| Move, copy or delete elements; use classes that already appear somewhere in the site | No |
Change a colour, a font, a breakpoint; use a class that appears nowhere yet (say mt-7) |
Yes |
Rebuilding the stylesheet
Section titled “Rebuilding the stylesheet”Once, install the tools (needs Node.js 20 or newer):
npm installThen, after a change:
npm run build:css # one buildnpm run watch:css # rebuilds on every save while you workBoth write assets/css/style.css. The build scans the .html files in the root folder and one folder down (blog/,
legal/), and assets/js/main.js, so a class you add there is picked up. Upload the new style.css with your pages.
Colours
Section titled “Colours”In src/css/style.css:
@theme { --color-green: #2f3724; /* headings, text on light, the dark buttons and cards, the founder quote */ --color-black: #000000; /* text typed into a field */ --color-grey: #707070; /* leads, descriptions, meta, labels */ --color-brown: #ae8c73; /* the hero's second button */ --color-orange: #f98b31; /* the button hover fill, stars, "(32% off)", link hovers */ --color-soft-grey: #b4b4b4; /* the pricing switch when off, the open row's minus */ --color-background: #fcfbf6; /* the page, text over photos */ --color-white: #ffffff; /* cards, light buttons */ --color-pressed: #333333; /* the Submit button while pressed */ --color-error: #ff2244; /* the Submit button's error label (and its 15% fill) */ --color-spinner: #999999; /* the ring of the loading spinner */}Each name becomes a class (bg-green, text-grey, border-orange). Change the values, rebuild, and the pages follow.
The palette is a deep olive green on a warm off-white page, with Orange as the accent of every hover: Green on
Background reads at about 12 : 1, Grey on Background at about 4.8 : 1. Keep text on its background at 4.5 : 1 or more,
so it stays readable.
The translucent shades are opacity modifiers on a token, so they follow it when you change it:
| Class | Used for |
|---|---|
black/30 |
Placeholders, a focused field’s border, the middle of the photo veils |
black/10 |
The footer’s dividing line |
black/5 |
Field fills and borders, the checkboxes |
white/10 |
The hero’s dividing line |
white/5 |
The header’s pill and menu button over a photo, behind a blur |
A few colours sit outside the tokens:
| Colour | Where |
|---|---|
Green #2f3724, White #ffffff and Soft Grey #b4b4b4 as values |
The “+” boxes of the rows and the team cards (inline style="background-color: …" in the pages) and the colours the script animates to (assets/js/main.js: the buttons’ tones, the “+” boxes, the team cards). When you change Green, also replace #2f3724 in every .html file and in main.js |
The logo as files (logo-white.svg, white; logo.png) |
assets/images/ (the pages draw the logo inline; these are for use elsewhere) |
| The browser icons for light and dark browser themes (the leaf in Green, and in Background) and the home-screen icon | icon-light.svg, icon-dark.svg, apple-icon.png |
| The swatches of the style guide repeat the hex values as text | style-guide.html |
Gradients: the photo veil of the page titles, the hero, a post’s photo and the founder quote runs from transparent
through black/30 to black; the booking section’s band fades from Background to White at its top.
Logo and icons
Section titled “Logo and icons”The logo, a leaf and the “Metuo” wordmark, is an <svg viewBox="0 0 372 100"> drawing inside the logo link of the
header and of the footer in every page. Its shapes are filled with currentColor, so it takes the text colour (white
over the hero photos, Green elsewhere). To use your own, replace the <svg>…</svg> with your logo’s, keeping
aria-hidden="true" and class="block size-full" on it and fill="currentColor" on its shapes. VS Code’s Replace in
Files does every page at once: turn on regular expressions (.*), search for
<svg viewBox="0 0 372 100"(.|\n)*?</svg\s*>and replace it with your <svg> on one line. Then replace aria-label="Metuo" on the two links with your name.
The logo is 92 × 25 px on every screen: the link carries h-[25px] w-[92px]. For a logo of other proportions, change
the width or the height to your artwork’s ratio in both links, and rebuild the stylesheet if the class is new.
icon-light.svg and icon-dark.svg (350 × 350) are the icons in the browser tab, for light and dark browser themes;
apple-icon.png (180 × 180) is the icon on a phone’s home screen. Replace the files, keeping the names.
The interface icons are inline SVG from Phosphor: the arrow of the buttons and the footer’s
links, and the five stars of the rating, drawn on a 256 × 256 grid in the current text colour. To use another icon,
open it on phosphoricons.com, copy its <path d="…"> and paste it in place of the old one. The “+” boxes are drawn
with two lines in HTML. The social icons are image files in assets/images/ (icon-facebook.svg …).
Manrope ships in assets/fonts/ as one variable file, manrope-variable.woff2 (weights 200 to 800, upright only),
declared at the top of src/css/style.css:
@font-face{font-family:"Manrope"; src:url("../fonts/manrope-variable.woff2") format("woff2"); font-display:swap; unicode-range:…; font-weight:200 800; font-style:normal; }:root{--font-manrope:Manrope,"Manrope fallback: Arial",sans-serif; }Every page uses it through font-sans on the <body>. Text is set in weight 400, the headings and the menu in 500, the
button labels in 600 and the team bios in bold; every style is spaced a little tighter than normal
(tracking-[-0.03em]).
To use another font:
- Put its
.woff2files inassets/fonts/. - Change the
@font-facerule (font-familyandsrc) and the first name in--font-manrope. A font that isn’t variable needs one@font-facerule per weight file (400, 500, 600 and 700). - Rebuild the stylesheet.
The Manrope fallback: Arial rule sizes Arial like Manrope while the font loads; with another font, you can delete it
and its name in --font-manrope. The font file covers Western European languages (the rule’s unicode-range); for
other alphabets, use files that include them and remove the unicode-range. Fonts from
Google Fonts can be downloaded as files with https://gwfh.mranftl.com, so they are served
from your own domain, which is faster and needs no consent banner.
Sizes and spacing
Section titled “Sizes and spacing”Text sizes are classes with a phone value first and the tablet (md:) and desktop (lg:) values after:
text-[32px] md:text-[36px] lg:text-[40px]. The style guide lists every text style:
| Style | Phone | Tablet | Desktop | Used for |
|---|---|---|---|---|
| Display | 52 | 58 | 64 | The Home hero’s title, the page titles over a photo |
| Heading 1 | 42 | 48 | 54 | Contact’s and a post’s titles, prices, the figures |
| Heading 2 | 32 | 36 | 40 | Section titles |
| Heading 3 | 28 | 32 | 36 | The founder quote, the headings in a post’s text, the 404’s title |
| Heading 4 | 24 | 26 | 28 | A plan’s name, a story’s headline on Home, the form’s title |
| Heading 5 | 20 | 19 | 24 | The page titles’ line, the Testimonial page’s headlines |
| Heading 6 | 18 | 19 | 20 | Row, card and question titles, quotes on story cards |
| Paragraph | 16 | 16 | 16 | Leads, descriptions, a post’s text, the footer’s links |
| Small | 14 | 14 | 14 | Section labels, field labels, meta, number bubbles |
| Tiny | 12 | 12 | 12 | The hero’s foot lines, a plan’s “Perfect for” note |
| Menu | 14 | 14 | 14 | The header’s links (weight 500) |
| Button | 14 | 14 | 14 | Button labels, the Submit button (weight 600) |
Headings have a line height of 1.1 (Heading 6: 1.2), the paragraph styles 1.2. Heading 5 is smaller on tablets than on phones, as in the original design.
Spacing uses Tailwind’s scale (4 px per step, so gap-5 is 20 px) or exact values in brackets (gap-[50px]). Content
is at most 1200 px wide (max-w-[1200px]), with 15, 20 and 30 px at the sides; most sections have 60 / 80 / 100 px above
and below. Corners are 10 px on cards, rows and photos; 5 px on buttons, fields, the “+” boxes, the arrow box, the menu
button and the portraits; 4 px on the checkboxes; round on bubbles, dots, avatars and the price switch. There are no drop
shadows.
| Width | Prefix | |
|---|---|---|
| Phone | below 810 px | (none) |
| Tablet | 810–1199 px | md: |
| Desktop | 1200 px and up | lg: |
max-md: and max-lg: apply below those widths.
Components
Section titled “Components”style-guide.html shows the colours, the text styles, the motion, the actions (buttons, links, the “+” box, the price
switch), the logo and the icons, the navigation, the layout, the cards (post, price, service, team, testimonial), the
data (figures, points, client ratings), the patterns (the steps, the questions, the prices, the services, the lit lists,
the story card, loading on scroll, rich text), the media and scroll effects and the form with its button’s states, each
with its name. To reuse one, copy its markup from there or from the page that shows it.
Elements with data-… attributes are wired to the site script, so keep those attributes when you copy them:
data-header, data-header-cover, data-header-switch, data-hamburger, data-phone-menu, data-close-menu,
data-menu-index, data-hover, data-motion, data-transition, data-tone, data-part, data-parallax,
data-scroll-transform, data-accordion, data-faq, data-accordion-item, data-service-list, data-service-row,
data-service-photos, data-plus-minus, data-pricing, data-pricing-switch, data-price-roll, data-scroll-spy,
data-drag-ticker, data-story-cards, data-team-card, data-video-band, data-load-on-scroll, data-load-item,
data-client-ratings, data-social-list, data-form, data-current-year, …
Motion
Section titled “Motion”The page-load animations are CSS (they run without the script); everything that follows the pointer, a press or the
scroll is in assets/js/main.js. A few settings are written in the HTML:
| Effect | Where |
|---|---|
| The Home hero’s photo grows from 20 % to the full window, 0.8 s after a 0.5 s wait | animate-zoom-in on the photo’s box |
| The words of the Home hero come out of a blur and rise 10 px, 0.05 s apart | animate-word-in and style="animation-delay: …" on each word (Editing the site) |
| The header’s parts, the hero’s pill and its buttons rise into place on load | animate-appear and its animation-delay; the distance is --appear-y (18 px in the header, [--appear-y:35px] in the hero) |
| The photos under the page titles, the hero’s and a post’s move at half the scroll speed | data-parallax |
| The founder quote’s background drifts from 100 px up to 100 px down as it crosses the screen | data-scroll-transform data-y="[-100,100]" |
| Home “About us”: the large photo zooms from 150 % to 100 % as it scrolls in, smoothed | data-scroll-transform data-scale="[1.5,1]" data-smooth |
| The videos grow from 60 % and come down 160 px into place | data-scroll-transform data-y="[-160,0]" data-scale="[0.6,1]" |
| The footer rises 200 px into place over the end of the page | data-scroll-transform data-y="[-200,0]" on the box around the <footer> |
| Buttons: an Orange fill rises from the bottom, the label rolls up to a second copy and a new arrow slides in | data-hover on the button, and data-motion on its parts: the rest and hover values the script moves between |
| Links in the header and the footer roll their label up (the footer’s to an Orange copy, with an arrow) | data-hover and data-motion |
| Post cards: the photo zooms out from 105 % to 100 % | data-motion with data-transition="soft" |
| The client photos rise 20 px; the social icons rise 5 px and dim the others to 30 % | data-client-ratings, data-social-list |
| Rows open with their height; the “+” turns into a minus | data-accordion (one open at a time), data-faq (each on its own), data-service-list |
| “Why choose us” and “Our core values”: a point lights up as its photo passes the middle of the screen; on phones the photos run left at 10 px a second and can be dragged | data-scroll-spy, data-drag-ticker data-speed="10" |
| The story card on Home turns to the next story as each spacer passes the middle of the screen | data-story-cards, data-story-spacer (Editing the site) |
| The prices roll between the monthly and yearly lines | data-pricing, data-price-roll |
| The journal loads six posts at a time | data-page-size on the data-load-on-scroll box (Editing the site) |
The springs of the CSS transitions are in src/css/style.css (--ease-spring-a, no bounce, and --ease-spring-b, a
slight overshoot, run over 400 ms), with the load animations and their keyframes (appear, zoom-in, word-in). The
springs of the script are near the top of assets/js/main.js (search for tokens/motion.ts).
Reduced motion
Section titled “Reduced motion”With “reduce motion” switched on in the visitor’s system, movement is left out: the hero’s photo doesn’t zoom and its words and buttons fade in without rising, the page photos and the scroll effects stand still (in their final place), the photo ticker doesn’t run, and moves, turns and size changes jump. Fades and colour changes stay.