Airline — Low-Cost Carrier Landing
A loud, value-forward landing page for a fictional low-cost carrier built in vanilla HTML, CSS and JavaScript. It pairs a punchy fare-search hero with a live price ticker, a seats-left countdown, a deals grid of discounted routes, a pay-only-for-what-you-need add-ons explainer with a bundle upsell, an interactive SVG route map you can switch by hub, an app-download block with a boarding-pass mockup, a mobile drawer nav and scroll-reveal sections — all in a bold yellow, black and magenta palette.
MCP
Code
:root {
/* Low-cost carrier palette: loud yellow + black + magenta */
--yellow: #ffd400;
--yellow-d: #e6bf00;
--yellow-50: #fffbe0;
--ink: #0a0a0a;
--ink-2: #2a2a2a;
--muted: #5d5d5d;
--mag: #e6007e;
--mag-d: #c00069;
--mag-50: #ffe6f3;
--bg: #ffffff;
--surface: #ffffff;
--line: rgba(10, 10, 10, 0.12);
--line-2: rgba(10, 10, 10, 0.22);
--ok: #1f9d62;
--r-sm: 8px;
--r-md: 14px;
--r-lg: 20px;
--sh: 0 8px 28px rgba(10, 10, 10, 0.12);
--sh-hard: 6px 6px 0 var(--ink);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
margin: 0;
font-family: "Inter", system-ui, -apple-system, sans-serif;
background: var(--bg);
color: var(--ink);
line-height: 1.5;
-webkit-font-smoothing: antialiased;
text-rendering: optimizeLegibility;
}
.tnum { font-variant-numeric: tabular-nums; }
img, svg { display: block; }
h1, h2, h3, h4 { margin: 0; line-height: 1.05; letter-spacing: -0.02em; font-weight: 800; }
a { color: inherit; text-decoration: none; }
/* ===== Buttons ===== */
.btn {
font-family: inherit;
font-weight: 800;
font-size: 0.95rem;
border: 2px solid var(--ink);
border-radius: 999px;
padding: 0.7rem 1.3rem;
cursor: pointer;
transition: transform 0.08s ease, box-shadow 0.12s ease, background 0.15s ease;
white-space: nowrap;
}
.btn:active { transform: translateY(2px); }
.btn:focus-visible { outline: 3px solid var(--mag); outline-offset: 2px; }
.btn--solid { background: var(--yellow); color: var(--ink); box-shadow: 3px 3px 0 var(--ink); }
.btn--solid:hover { background: var(--yellow-d); box-shadow: 5px 5px 0 var(--ink); transform: translate(-1px, -1px); }
.btn--ghost { background: transparent; color: var(--ink); box-shadow: none; }
.btn--ghost:hover { background: var(--yellow-50); }
.btn--mag { background: var(--mag); color: #fff; box-shadow: 3px 3px 0 var(--ink); }
.btn--mag:hover { background: var(--mag-d); box-shadow: 5px 5px 0 var(--ink); transform: translate(-1px, -1px); }
.btn--block { width: 100%; display: block; text-align: center; }
/* ===== Ticker ===== */
.ticker {
background: var(--ink);
color: var(--yellow);
overflow: hidden;
font-weight: 700;
font-size: 0.85rem;
border-bottom: 2px solid var(--yellow);
}
.ticker__track {
display: inline-flex;
gap: 2.5rem;
padding: 0.5rem 0;
white-space: nowrap;
animation: scroll 26s linear infinite;
will-change: transform;
}
.ticker:hover .ticker__track { animation-play-state: paused; }
.ticker__item { letter-spacing: 0.04em; }
.ticker__item b { color: #fff; font-variant-numeric: tabular-nums; }
@keyframes scroll {
from { transform: translateX(0); }
to { transform: translateX(-50%); }
}
/* ===== Nav ===== */
.nav {
position: sticky;
top: 0;
z-index: 50;
display: flex;
align-items: center;
gap: 1.5rem;
padding: 0.85rem 1.5rem;
background: var(--yellow);
border-bottom: 3px solid var(--ink);
transition: padding 0.18s ease;
}
.nav.is-shrunk { padding: 0.55rem 1.5rem; }
.brand { display: inline-flex; align-items: center; gap: 0.5rem; }
.brand__mark {
display: grid; place-items: center;
width: 32px; height: 32px;
background: var(--ink); color: var(--yellow);
border-radius: 8px; font-size: 1.05rem;
transform: rotate(-12deg);
}
.brand__name { font-weight: 800; font-size: 1.25rem; letter-spacing: -0.03em; }
.brand__name i { font-style: normal; color: var(--mag); }
.nav__links { display: flex; gap: 1.4rem; margin-left: 1rem; font-weight: 700; }
.nav__links a { position: relative; padding: 0.2rem 0; }
.nav__links a::after {
content: ""; position: absolute; left: 0; bottom: -2px; height: 3px; width: 0;
background: var(--mag); transition: width 0.18s ease;
}
.nav__links a:hover::after { width: 100%; }
.nav__actions { margin-left: auto; display: flex; gap: 0.6rem; }
.nav__burger { display: none; background: none; border: none; cursor: pointer; padding: 6px; margin-left: auto; }
.nav__burger span { display: block; width: 26px; height: 3px; background: var(--ink); border-radius: 2px; margin: 4px 0; transition: transform 0.2s ease, opacity 0.2s ease; }
.nav__burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav__burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
/* ===== Mobile nav ===== */
.mnav {
position: fixed; inset: 0 0 0 auto; top: 0; z-index: 60;
width: min(78vw, 320px); height: 100dvh;
background: var(--ink); color: #fff;
transform: translateX(100%); transition: transform 0.26s cubic-bezier(.2,.8,.2,1);
padding: 5rem 1.5rem 2rem;
}
.mnav.is-open { transform: translateX(0); }
.mnav nav { display: flex; flex-direction: column; gap: 0.3rem; }
.mnav a { font-size: 1.4rem; font-weight: 800; padding: 0.7rem 0; border-bottom: 1px solid rgba(255,255,255,0.12); }
.mnav a:hover { color: var(--yellow); }
.mnav .btn { margin-top: 1.4rem; }
/* ===== Hero ===== */
.hero {
display: grid;
grid-template-columns: 1.4fr 0.9fr;
gap: 2.5rem;
align-items: center;
max-width: 1180px;
margin: 0 auto;
padding: 3.5rem 1.5rem 3rem;
}
.kick {
display: inline-block; font-weight: 800; font-size: 0.78rem; letter-spacing: 0.14em;
background: var(--ink); color: var(--yellow); padding: 0.3rem 0.7rem; border-radius: 6px;
margin-bottom: 1.1rem;
}
.kick--dark { background: var(--yellow); color: var(--ink); }
.hero h1 { font-size: clamp(2.6rem, 7vw, 4.4rem); letter-spacing: -0.04em; }
.hero h1 .hl { color: var(--mag); position: relative; white-space: nowrap; }
.hero h1 .hl::after {
content: ""; position: absolute; left: -2%; right: -2%; bottom: 6%; height: 32%;
background: var(--yellow); z-index: -1; transform: rotate(-1.5deg);
}
.hero__sub { font-size: 1.1rem; color: var(--muted); max-width: 30ch; margin: 1.1rem 0 1.6rem; font-weight: 500; }
.search {
display: grid;
grid-template-columns: 1fr auto 1fr;
gap: 0.6rem;
background: var(--surface);
border: 3px solid var(--ink);
border-radius: var(--r-lg);
padding: 0.9rem;
box-shadow: var(--sh-hard);
align-items: end;
}
.search__field { display: flex; flex-direction: column; min-width: 0; }
.search__field label { font-size: 0.7rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin-bottom: 0.25rem; }
.search__field input, .search__field select {
font-family: inherit; font-weight: 700; font-size: 0.95rem; color: var(--ink);
border: 2px solid var(--line-2); border-radius: var(--r-sm);
padding: 0.55rem 0.6rem; background: #fff; width: 100%;
}
.search__field input:focus, .search__field select:focus { outline: none; border-color: var(--mag); }
.search__swap {
align-self: end; margin-bottom: 0.1rem;
width: 38px; height: 38px; border-radius: 999px;
border: 2px solid var(--ink); background: var(--yellow); cursor: pointer;
font-size: 1.1rem; font-weight: 800; transition: transform 0.2s ease;
}
.search__swap:hover { transform: rotate(180deg); }
.search__field--date, .search__field--pax { grid-column: span 1; }
.search__field--date { grid-column: 1 / 2; }
.search__field--pax { grid-column: 3 / 4; }
.btn--search { grid-column: 1 / -1; margin-top: 0.2rem; font-size: 1.05rem; padding: 0.85rem; }
.hero__badges { list-style: none; display: flex; flex-wrap: wrap; gap: 0.5rem 1.2rem; padding: 0; margin: 1.4rem 0 0; font-weight: 700; font-size: 0.85rem; color: var(--ink-2); }
/* Price card */
.hero__price { align-self: stretch; }
.pricecard {
background: var(--ink); color: #fff;
border-radius: var(--r-lg); padding: 1.5rem;
border: 3px solid var(--ink);
box-shadow: 8px 8px 0 var(--mag);
}
.pricecard__top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.pricecard__route { font-weight: 800; letter-spacing: 0.05em; }
.pricecard__route i { color: var(--yellow); font-style: normal; margin: 0 0.2rem; }
.pricecard__big { display: flex; align-items: flex-start; font-weight: 800; line-height: 1; color: var(--yellow); font-variant-numeric: tabular-nums; }
.pricecard__big .cur { font-size: 1.8rem; margin-top: 0.35rem; }
.pricecard__big .amt { font-size: 4.6rem; letter-spacing: -0.04em; }
.pricecard__big .dec { font-size: 1.8rem; margin-top: 0.35rem; }
.pricecard__meta { display: flex; justify-content: space-between; font-size: 0.82rem; font-weight: 600; color: rgba(255,255,255,0.7); margin: 0.6rem 0 0.8rem; }
.pricecard__seats { color: var(--yellow); }
.pricebar { height: 7px; background: rgba(255,255,255,0.15); border-radius: 999px; overflow: hidden; margin-bottom: 1.1rem; }
.pricebar i { display: block; height: 100%; background: var(--mag); transition: width 0.6s ease; }
/* ===== Pills ===== */
.pill {
display: inline-flex; align-items: center; gap: 0.3rem;
font-weight: 800; font-size: 0.7rem; letter-spacing: 0.06em;
padding: 0.28rem 0.6rem; border-radius: 999px; text-transform: uppercase;
}
.pill--hot { background: var(--mag); color: #fff; }
.pill--mag { background: var(--mag); color: #fff; }
.pill--ok { background: var(--ok); color: #fff; }
/* ===== Sections ===== */
.section { max-width: 1180px; margin: 0 auto; padding: 4rem 1.5rem; }
.section--alt { background: var(--yellow-50); max-width: none; }
.section--alt > * { max-width: 1180px; margin-inline: auto; }
.section__head { max-width: 40ch; margin-bottom: 2rem; }
.section__head h2 { font-size: clamp(1.7rem, 4vw, 2.6rem); }
.section__head p { color: var(--muted); font-weight: 500; margin: 0.6rem 0 0; font-size: 1.05rem; }
/* ===== Deals grid ===== */
.deals { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1.1rem; }
.deal {
border: 2px solid var(--ink); border-radius: var(--r-md);
background: #fff; padding: 1.2rem; cursor: pointer;
transition: transform 0.12s ease, box-shadow 0.12s ease;
display: flex; flex-direction: column; gap: 0.7rem;
}
.deal:hover { transform: translate(-2px, -2px); box-shadow: 5px 5px 0 var(--ink); }
.deal__route { display: flex; align-items: center; gap: 0.5rem; font-weight: 800; font-size: 1.05rem; }
.deal__route i { color: var(--mag); font-style: normal; }
.deal__sub { font-size: 0.82rem; color: var(--muted); font-weight: 600; }
.deal__bottom { display: flex; align-items: flex-end; justify-content: space-between; margin-top: auto; }
.deal__price { font-weight: 800; font-size: 1.7rem; font-variant-numeric: tabular-nums; line-height: 1; }
.deal__price small { font-size: 0.75rem; color: var(--muted); font-weight: 600; }
.deal__price .down { color: var(--mag); }
.deal__cta { font-size: 0.8rem; font-weight: 800; color: var(--mag); }
.deal__tag {
align-self: flex-start; font-size: 0.66rem; font-weight: 800; letter-spacing: 0.06em;
text-transform: uppercase; background: var(--yellow); padding: 0.2rem 0.5rem; border-radius: 5px;
}
/* ===== Add-ons ===== */
.addons { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1.1rem; }
.addon {
background: #fff; border: 2px solid var(--ink); border-radius: var(--r-md);
padding: 1.4rem; transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.addon:hover, .addon:focus { transform: translate(-2px, -2px); box-shadow: 5px 5px 0 var(--mag); outline: none; }
.addon__icon { font-size: 2rem; display: block; margin-bottom: 0.7rem; }
.addon h3 { font-size: 1.15rem; margin-bottom: 0.35rem; }
.addon p { font-size: 0.88rem; color: var(--muted); font-weight: 500; margin: 0 0 0.9rem; }
.addon__price { font-weight: 800; color: var(--mag); font-variant-numeric: tabular-nums; }
.bundle {
margin-top: 1.6rem;
display: flex; flex-wrap: wrap; gap: 1.5rem; align-items: center; justify-content: space-between;
background: var(--ink); color: #fff;
border-radius: var(--r-lg); padding: 1.8rem;
border: 3px solid var(--ink); box-shadow: 8px 8px 0 var(--yellow);
}
.bundle__copy h3 { font-size: 1.5rem; margin: 0.7rem 0 0.4rem; }
.bundle__copy p { color: rgba(255,255,255,0.78); font-weight: 500; max-width: 44ch; margin: 0; }
.bundle__copy b { color: var(--yellow); }
.bundle__price { display: flex; flex-direction: column; align-items: flex-end; gap: 0.4rem; }
.bundle__from { font-size: 0.78rem; font-weight: 600; color: rgba(255,255,255,0.6); }
.bundle__price strong { font-size: 2.4rem; color: var(--yellow); font-variant-numeric: tabular-nums; line-height: 1; }
/* ===== Routes ===== */
.routes { display: grid; gap: 1.5rem; }
.routes__hubs { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.hub {
font-family: inherit; font-weight: 800; font-size: 0.95rem;
border: 2px solid var(--ink); border-radius: 999px; background: #fff; color: var(--ink);
padding: 0.55rem 1.1rem; cursor: pointer; transition: background 0.15s ease, color 0.15s ease;
}
.hub:hover { background: var(--yellow-50); }
.hub.is-active { background: var(--ink); color: var(--yellow); }
.hub:focus-visible { outline: 3px solid var(--mag); outline-offset: 2px; }
.routes__map { display: grid; grid-template-columns: 1.3fr 0.9fr; gap: 1.5rem; align-items: stretch; }
.map { width: 100%; height: auto; background: var(--yellow-50); border: 2px solid var(--ink); border-radius: var(--r-md); }
.map circle { transition: r 0.2s ease; }
.routes__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.5rem; }
.routes__list li {
display: flex; justify-content: space-between; align-items: center;
border: 2px solid var(--line); border-radius: var(--r-sm); padding: 0.7rem 0.9rem;
font-weight: 700; transition: border-color 0.15s ease, transform 0.1s ease;
}
.routes__list li:hover { border-color: var(--ink); transform: translateX(3px); }
.routes__list .ro-city { display: flex; align-items: center; gap: 0.5rem; }
.routes__list .ro-city i { color: var(--mag); font-style: normal; }
.routes__list .ro-price { color: var(--mag); font-variant-numeric: tabular-nums; }
/* ===== App CTA ===== */
.appcta { background: var(--yellow); border-top: 3px solid var(--ink); border-bottom: 3px solid var(--ink); }
.appcta__inner { max-width: 1180px; margin: 0 auto; padding: 4rem 1.5rem; display: grid; grid-template-columns: 1.1fr 0.7fr; gap: 2.5rem; align-items: center; }
.appcta h2 { font-size: clamp(1.8rem, 4.5vw, 3rem); margin-bottom: 0.8rem; }
.appcta p { max-width: 42ch; font-weight: 500; color: var(--ink-2); margin-bottom: 1.4rem; }
.appcta__form { display: flex; gap: 0.6rem; flex-wrap: wrap; margin-bottom: 1.2rem; }
.appcta__form input {
font-family: inherit; font-weight: 700; font-size: 0.95rem;
border: 2px solid var(--ink); border-radius: 999px; padding: 0.7rem 1.1rem; flex: 1; min-width: 180px; background: #fff;
}
.appcta__form input:focus { outline: none; box-shadow: 0 0 0 3px var(--mag); }
.appcta__stores { display: flex; gap: 0.6rem; }
.store {
font-family: inherit; font-weight: 800; font-size: 0.9rem;
background: var(--ink); color: #fff; border: 2px solid var(--ink); border-radius: var(--r-sm);
padding: 0.6rem 1.1rem; cursor: pointer; transition: transform 0.1s ease;
}
.store:hover { transform: translateY(-2px); }
.appcta__phone { display: grid; place-items: center; }
.phone {
width: 230px; background: var(--ink); border-radius: 30px; padding: 12px;
box-shadow: 10px 10px 0 var(--mag); position: relative;
}
.phone__notch { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); width: 90px; height: 18px; background: var(--ink); border-radius: 0 0 12px 12px; z-index: 2; }
.phone__screen { background: #fff; border-radius: 20px; padding: 1.1rem; }
.phone__bp { border: 2px dashed var(--line-2); border-radius: var(--r-md); padding: 0.9rem; }
.phone__bp-row { display: flex; justify-content: space-between; align-items: center; font-variant-numeric: tabular-nums; }
.phone__bp-route { display: flex; align-items: center; justify-content: center; gap: 0.7rem; font-size: 1.5rem; font-weight: 800; margin: 0.8rem 0; }
.phone__bp-route i { color: var(--mag); font-size: 1.1rem; }
.phone__bp-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.4rem; text-align: center; }
.phone__bp-grid small { display: block; font-size: 0.62rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.phone__bp-grid b { font-size: 0.95rem; font-variant-numeric: tabular-nums; }
.phone__bp-perf { border-top: 2px dashed var(--line-2); margin: 0.8rem -0.9rem; }
.phone__bp-bar { height: 30px; margin-top: 0.6rem; background: repeating-linear-gradient(90deg, var(--ink) 0 3px, transparent 3px 6px, var(--ink) 6px 7px, transparent 7px 11px); border-radius: 3px; }
/* ===== Footer ===== */
.footer { background: var(--ink); color: #fff; padding: 3rem 1.5rem 1.5rem; }
.footer__grid { max-width: 1180px; margin: 0 auto; display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 2rem; }
.footer__brand .brand__name { font-size: 1.5rem; }
.footer__brand p { color: rgba(255,255,255,0.6); font-weight: 500; font-size: 0.9rem; max-width: 36ch; margin: 0.7rem 0 0; }
.footer__col h4 { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--yellow); margin-bottom: 0.9rem; }
.footer__col a { display: block; color: rgba(255,255,255,0.78); font-weight: 500; padding: 0.28rem 0; font-size: 0.9rem; }
.footer__col a:hover { color: var(--yellow); }
.footer__bar { max-width: 1180px; margin: 2.5rem auto 0; padding-top: 1.3rem; border-top: 1px solid rgba(255,255,255,0.14); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.5rem; font-size: 0.8rem; color: rgba(255,255,255,0.55); }
/* ===== Toast ===== */
.toast {
position: fixed; left: 50%; bottom: 1.5rem; transform: translate(-50%, 140%);
background: var(--ink); color: var(--yellow); font-weight: 700; font-size: 0.9rem;
padding: 0.8rem 1.2rem; border-radius: 999px; border: 2px solid var(--yellow);
z-index: 100; transition: transform 0.3s cubic-bezier(.2,.9,.2,1); box-shadow: var(--sh); max-width: 90vw; text-align: center;
}
.toast.is-show { transform: translate(-50%, 0); }
/* ===== Reveal ===== */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.is-in { opacity: 1; transform: none; }
/* ===== Responsive ===== */
@media (max-width: 900px) {
.hero { grid-template-columns: 1fr; }
.routes__map { grid-template-columns: 1fr; }
.appcta__inner { grid-template-columns: 1fr; }
.appcta__phone { order: -1; }
.footer__grid { grid-template-columns: 1fr 1fr; }
.nav__links, .nav__actions { display: none; }
.nav__burger { display: block; }
}
@media (max-width: 520px) {
.nav { gap: 0.8rem; padding: 0.7rem 1rem; }
.hero { padding: 2.2rem 1rem; }
.search { grid-template-columns: 1fr; }
.search__swap { justify-self: center; transform: rotate(90deg); }
.search__swap:hover { transform: rotate(270deg); }
.search__field--date, .search__field--pax { grid-column: auto; }
.section { padding: 2.8rem 1rem; }
.section--alt { padding: 2.8rem 0; }
.bundle { flex-direction: column; align-items: flex-start; }
.bundle__price { align-items: flex-start; width: 100%; }
.footer__grid { grid-template-columns: 1fr; }
.pricecard__big .amt { font-size: 3.6rem; }
}
@media (prefers-reduced-motion: reduce) {
.ticker__track { animation: none; }
.reveal { opacity: 1; transform: none; transition: none; }
* { scroll-behavior: auto; }
}(function () {
"use strict";
/* ---------- Toast helper ---------- */
var toastEl = document.getElementById("toast");
var toastTimer;
function toast(msg) {
if (!toastEl) return;
toastEl.textContent = msg;
toastEl.classList.add("is-show");
clearTimeout(toastTimer);
toastTimer = setTimeout(function () {
toastEl.classList.remove("is-show");
}, 2400);
}
document.querySelectorAll("[data-toast]").forEach(function (el) {
el.addEventListener("click", function () {
toast(el.getAttribute("data-toast"));
});
});
/* ---------- Ticker: duplicate items for seamless loop ---------- */
var ticker = document.getElementById("ticker");
if (ticker) {
ticker.innerHTML += ticker.innerHTML;
}
/* ---------- Nav shrink on scroll ---------- */
var nav = document.getElementById("nav");
window.addEventListener(
"scroll",
function () {
if (!nav) return;
nav.classList.toggle("is-shrunk", window.scrollY > 40);
},
{ passive: true }
);
/* ---------- Mobile nav ---------- */
var burger = document.getElementById("burger");
var mnav = document.getElementById("mobileNav");
function closeMnav() {
if (!mnav) return;
mnav.classList.remove("is-open");
mnav.setAttribute("aria-hidden", "true");
burger.setAttribute("aria-expanded", "false");
}
if (burger && mnav) {
burger.addEventListener("click", function () {
var open = mnav.classList.toggle("is-open");
mnav.setAttribute("aria-hidden", open ? "false" : "true");
burger.setAttribute("aria-expanded", open ? "true" : "false");
});
mnav.querySelectorAll("a").forEach(function (a) {
a.addEventListener("click", closeMnav);
});
document.addEventListener("keydown", function (e) {
if (e.key === "Escape") closeMnav();
});
}
/* ---------- Hero search ---------- */
var form = document.getElementById("searchForm");
var when = document.getElementById("when");
if (when) {
var d = new Date();
d.setDate(d.getDate() + 14);
when.value = d.toISOString().slice(0, 10);
when.min = new Date().toISOString().slice(0, 10);
}
var swap = document.getElementById("swap");
if (swap) {
swap.addEventListener("click", function () {
var from = document.getElementById("from");
var to = document.getElementById("to");
var tmp = from.value;
from.value = to.value;
to.value = tmp;
toast("Swapped — " + from.value.split(" ")[0] + " ↔ " + to.value.split(" ")[0]);
});
}
if (form) {
form.addEventListener("submit", function (e) {
e.preventDefault();
var from = document.getElementById("from").value.trim() || "anywhere";
var to = document.getElementById("to").value.trim() || "anywhere";
toast("Searching " + from.split(" ")[0] + " → " + to.split(" ")[0] + " · from €9.99");
});
}
var navBook = document.getElementById("navBook");
if (navBook) {
navBook.addEventListener("click", function () {
document.getElementById("top").scrollIntoView({ behavior: "smooth" });
var f = document.getElementById("from");
if (f) setTimeout(function () { f.focus(); }, 350);
});
}
/* ---------- Hero price ticker (live wobble) ---------- */
var heroAmt = document.getElementById("heroAmt");
var heroDec = document.getElementById("heroDec");
var heroPrices = [14.99, 12.99, 15.99, 13.49, 16.99, 11.99];
var hi = 0;
if (heroAmt && heroDec) {
setInterval(function () {
hi = (hi + 1) % heroPrices.length;
var v = heroPrices[hi];
var parts = v.toFixed(2).split(".");
heroAmt.textContent = parts[0];
heroDec.textContent = "." + parts[1];
var bar = document.getElementById("priceBar");
if (bar) bar.style.width = Math.round((v - 11) / 7 * 80 + 12) + "%";
}, 2600);
}
/* seats-left countdown */
var seatsEl = document.getElementById("seatsLeft");
var seats = 7;
if (seatsEl) {
setInterval(function () {
if (seats > 2 && Math.random() > 0.5) {
seats--;
seatsEl.textContent = seats + " seats left";
}
}, 5200);
}
/* ---------- Deals grid ---------- */
var DEALS = [
{ f: "BCN", t: "ROM", city: "Rome", price: 14.99, was: 39, tag: "Hot" },
{ f: "LON", t: "BER", city: "Berlin", price: 19.99, was: 49, tag: "Weekend" },
{ f: "MAD", t: "PAR", city: "Paris", price: 21.99, was: 55, tag: "City break" },
{ f: "LIS", t: "MIL", city: "Milan", price: 16.99, was: 44, tag: "Hot" },
{ f: "DUB", t: "AMS", city: "Amsterdam", price: 24.99, was: 59, tag: "Flash" },
{ f: "VIE", t: "ATH", city: "Athens", price: 29.99, was: 69, tag: "Sun" },
{ f: "PRG", t: "BCN", city: "Barcelona", price: 18.49, was: 47, tag: "Weekend" },
{ f: "CPH", t: "FCO", city: "Rome", price: 27.99, was: 64, tag: "City break" }
];
var grid = document.getElementById("dealsGrid");
if (grid) {
DEALS.forEach(function (d) {
var off = Math.round((1 - d.price / d.was) * 100);
var card = document.createElement("article");
card.className = "deal";
card.setAttribute("tabindex", "0");
card.setAttribute("role", "button");
card.innerHTML =
'<span class="deal__tag">' + d.tag + " · −" + off + "%</span>" +
'<div class="deal__route">' + d.f + ' <i>✈</i> ' + d.t + "</div>" +
'<div class="deal__sub">One way to ' + d.city + " · all taxes in</div>" +
'<div class="deal__bottom">' +
'<div class="deal__price">€<span class="down tnum">' + d.price.toFixed(2) + "</span>" +
"<br><small>was €" + d.was + "</small></div>" +
'<span class="deal__cta">Book →</span></div>';
function go() { toast("Selected " + d.f + " → " + d.t + " · €" + d.price.toFixed(2)); }
card.addEventListener("click", go);
card.addEventListener("keydown", function (e) {
if (e.key === "Enter" || e.key === " ") { e.preventDefault(); go(); }
});
grid.appendChild(card);
});
}
/* ---------- SMS app form ---------- */
var smsForm = document.getElementById("smsForm");
if (smsForm) {
smsForm.addEventListener("submit", function (e) {
e.preventDefault();
var phone = document.getElementById("phone").value.trim();
if (phone.length < 6) { toast("Enter a valid number to get the link"); return; }
toast("Link sent! Check your texts 📲 (fictional)");
smsForm.reset();
});
}
/* ---------- Routes map ---------- */
var ROUTES = {
BCN: { hub: [110, 200], city: "Barcelona", dests: [
{ code: "FCO", city: "Rome", price: 14.99, xy: [330, 180] },
{ code: "BER", city: "Berlin", price: 26.99, xy: [340, 70] },
{ code: "ATH", city: "Athens", price: 32.99, xy: [440, 220] },
{ code: "AMS", city: "Amsterdam", price: 23.49, xy: [270, 60] }
] },
LON: { hub: [180, 70], city: "London", dests: [
{ code: "BCN", city: "Barcelona", price: 18.99, xy: [110, 210] },
{ code: "FCO", city: "Rome", price: 22.99, xy: [330, 180] },
{ code: "BER", city: "Berlin", price: 19.99, xy: [340, 90] },
{ code: "LIS", city: "Lisbon", price: 24.99, xy: [60, 230] }
] },
BER: { hub: [340, 80], city: "Berlin", dests: [
{ code: "BCN", city: "Barcelona", price: 26.99, xy: [110, 210] },
{ code: "ATH", city: "Athens", price: 29.99, xy: [440, 230] },
{ code: "FCO", city: "Rome", price: 21.49, xy: [330, 190] },
{ code: "AMS", city: "Amsterdam", price: 16.99, xy: [270, 70] }
] },
MAD: { hub: [80, 210], city: "Madrid", dests: [
{ code: "PAR", city: "Paris", price: 21.99, xy: [250, 100] },
{ code: "FCO", city: "Rome", price: 25.99, xy: [330, 180] },
{ code: "LON", city: "London", price: 23.99, xy: [180, 60] },
{ code: "ATH", city: "Athens", price: 34.99, xy: [440, 220] }
] }
};
var hubBtns = document.querySelectorAll(".hub");
var mapLines = document.getElementById("mapLines");
var mapDots = document.getElementById("mapDots");
var routeList = document.getElementById("routeList");
function renderHub(code) {
var data = ROUTES[code];
if (!data || !mapLines) return;
mapLines.innerHTML = "";
mapDots.innerHTML = "";
routeList.innerHTML = "";
var hx = data.hub[0], hy = data.hub[1];
data.dests.forEach(function (dst, i) {
var line = document.createElementNS("http://www.w3.org/2000/svg", "line");
line.setAttribute("x1", hx); line.setAttribute("y1", hy);
line.setAttribute("x2", hx); line.setAttribute("y2", hy);
mapLines.appendChild(line);
requestAnimationFrame(function () {
line.style.transition = "all 0.5s ease " + (i * 0.06) + "s";
line.setAttribute("x2", dst.xy[0]);
line.setAttribute("y2", dst.xy[1]);
});
var dot = document.createElementNS("http://www.w3.org/2000/svg", "circle");
dot.setAttribute("cx", dst.xy[0]); dot.setAttribute("cy", dst.xy[1]);
dot.setAttribute("r", 5); dot.setAttribute("fill", "#e6007e");
dot.setAttribute("stroke", "#000"); dot.setAttribute("stroke-width", "1.5");
mapDots.appendChild(dot);
var li = document.createElement("li");
li.innerHTML = '<span class="ro-city">' + code + ' <i>✈</i> ' + dst.code +
' · ' + dst.city + "</span>" +
'<span class="ro-price tnum">€' + dst.price.toFixed(2) + "</span>";
li.addEventListener("click", function () {
toast(code + " → " + dst.code + " · €" + dst.price.toFixed(2));
});
routeList.appendChild(li);
});
var hub = document.createElementNS("http://www.w3.org/2000/svg", "circle");
hub.setAttribute("cx", hx); hub.setAttribute("cy", hy);
hub.setAttribute("r", 8); hub.setAttribute("fill", "#ffd400");
hub.setAttribute("stroke", "#000"); hub.setAttribute("stroke-width", "2.5");
mapDots.appendChild(hub);
}
hubBtns.forEach(function (btn) {
btn.addEventListener("click", function () {
hubBtns.forEach(function (b) {
b.classList.remove("is-active");
b.setAttribute("aria-selected", "false");
});
btn.classList.add("is-active");
btn.setAttribute("aria-selected", "true");
renderHub(btn.getAttribute("data-hub"));
});
});
renderHub("BCN");
/* ---------- Scroll reveal ---------- */
var reveals = document.querySelectorAll(".reveal");
if ("IntersectionObserver" in window) {
var io = new IntersectionObserver(
function (entries) {
entries.forEach(function (en) {
if (en.isIntersecting) {
en.target.classList.add("is-in");
io.unobserve(en.target);
}
});
},
{ threshold: 0.12 }
);
reveals.forEach(function (r) { io.observe(r); });
} else {
reveals.forEach(function (r) { r.classList.add("is-in"); });
}
})();<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Zippa Air — Cheap Flights, Loud Prices</title>
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap" rel="stylesheet" />
<link rel="stylesheet" href="style.css" />
</head>
<body>
<!-- ===== Top fare ticker ===== -->
<div class="ticker" aria-label="Latest fare deals">
<div class="ticker__track" id="ticker">
<span class="ticker__item">BCN → ROM <b>€14.99</b></span>
<span class="ticker__item">LON → BER <b>€19.99</b></span>
<span class="ticker__item">MAD → PAR <b>€21.99</b></span>
<span class="ticker__item">LIS → MIL <b>€16.99</b></span>
<span class="ticker__item">DUB → AMS <b>€24.99</b></span>
<span class="ticker__item">VIE → ATH <b>€29.99</b></span>
</div>
</div>
<!-- ===== Nav ===== -->
<header class="nav" id="nav">
<a class="brand" href="#top" aria-label="Zippa Air home">
<span class="brand__mark" aria-hidden="true">✈</span>
<span class="brand__name">ZIPPA<i>AIR</i></span>
</a>
<nav class="nav__links" aria-label="Primary">
<a href="#deals">Deals</a>
<a href="#addons">Add-ons</a>
<a href="#routes">Routes</a>
<a href="#app">App</a>
</nav>
<div class="nav__actions">
<button class="btn btn--ghost" type="button" data-toast="Logged in as guest — fictional demo">Log in</button>
<button class="btn btn--solid" type="button" id="navBook">Book now</button>
</div>
<button class="nav__burger" id="burger" aria-label="Open menu" aria-expanded="false" aria-controls="mobileNav">
<span></span><span></span><span></span>
</button>
</header>
<!-- ===== Mobile nav drawer ===== -->
<div class="mnav" id="mobileNav" aria-hidden="true">
<nav aria-label="Mobile">
<a href="#deals">Deals</a>
<a href="#addons">Add-ons</a>
<a href="#routes">Routes</a>
<a href="#app">App</a>
<button class="btn btn--solid btn--block" type="button" data-toast="Search to find fares!">Book now</button>
</nav>
</div>
<main id="top">
<!-- ===== Hero ===== -->
<section class="hero reveal">
<div class="hero__copy">
<span class="kick">CHEAP. LOUD. EVERYWHERE.</span>
<h1>Fly Europe<br />from <span class="hl">€9.99</span></h1>
<p class="hero__sub">No fluff, no frills — just rock-bottom fares to 142 airports. Grab a seat before they sell out.</p>
<form class="search" id="searchForm" aria-label="Flight search">
<div class="search__field">
<label for="from">From</label>
<input id="from" name="from" type="text" value="Barcelona (BCN)" autocomplete="off" />
</div>
<button class="search__swap" type="button" id="swap" aria-label="Swap origin and destination">⇄</button>
<div class="search__field">
<label for="to">To</label>
<input id="to" name="to" type="text" value="Rome (FCO)" autocomplete="off" />
</div>
<div class="search__field search__field--date">
<label for="when">When</label>
<input id="when" name="when" type="date" />
</div>
<div class="search__field search__field--pax">
<label for="pax">Travellers</label>
<select id="pax" name="pax">
<option>1 adult</option>
<option>2 adults</option>
<option>2 adults, 1 child</option>
<option>4 adults</option>
</select>
</div>
<button class="btn btn--mag btn--search" type="submit">Find fares →</button>
</form>
<ul class="hero__badges">
<li>✓ No hidden booking fee</li>
<li>✓ Free seat at check-in</li>
<li>✓ Price-drop alerts</li>
</ul>
</div>
<aside class="hero__price" aria-label="Today's price callout">
<div class="pricecard">
<div class="pricecard__top">
<span class="pill pill--hot">HOT FARE</span>
<span class="pricecard__route">BCN <i>→</i> FCO</span>
</div>
<div class="pricecard__big">
<span class="cur">€</span><span class="amt" id="heroAmt">14</span><span class="dec" id="heroDec">.99</span>
</div>
<div class="pricecard__meta">
<span>One way · ZP 2204</span>
<span class="pricecard__seats" id="seatsLeft">7 seats left</span>
</div>
<div class="pricebar"><i id="priceBar" style="width:18%"></i></div>
<button class="btn btn--solid btn--block" type="button" data-toast="Held for 20 min — fictional demo">Grab this fare</button>
</div>
</aside>
</section>
<!-- ===== Deals grid ===== -->
<section class="section reveal" id="deals">
<div class="section__head">
<h2>This week's loudest deals</h2>
<p>Fares update every few seconds. Blink and they're gone.</p>
</div>
<div class="deals" id="dealsGrid"><!-- injected --></div>
</section>
<!-- ===== Add-ons explainer ===== -->
<section class="section section--alt reveal" id="addons">
<div class="section__head">
<h2>Pay only for what you need</h2>
<p>Base fare is dirt cheap. Add bags, seats & speedy boarding only if you want them.</p>
</div>
<div class="addons">
<article class="addon" tabindex="0">
<span class="addon__icon" aria-hidden="true">🧳</span>
<h3>Checked bag</h3>
<p>Up to 20 kg, drop & go at any desk.</p>
<span class="addon__price">+€11.99</span>
</article>
<article class="addon" tabindex="0">
<span class="addon__icon" aria-hidden="true">💺</span>
<h3>Pick your seat</h3>
<p>Window, aisle or extra legroom up front.</p>
<span class="addon__price">+€4.50</span>
</article>
<article class="addon" tabindex="0">
<span class="addon__icon" aria-hidden="true">⚡</span>
<h3>Speedy boarding</h3>
<p>Skip the queue, board first, settle in.</p>
<span class="addon__price">+€6.00</span>
</article>
<article class="addon" tabindex="0">
<span class="addon__icon" aria-hidden="true">🍿</span>
<h3>Snack combo</h3>
<p>Drink + snack pre-ordered, no cash needed.</p>
<span class="addon__price">+€7.50</span>
</article>
</div>
<div class="bundle">
<div class="bundle__copy">
<span class="pill pill--mag">BEST VALUE</span>
<h3>Grab the full Zippa Bundle</h3>
<p>Bag + seat + speedy boarding + snack, all in one tap. <b id="bundleSave">Save €8.49</b> vs buying separately.</p>
</div>
<div class="bundle__price">
<span class="bundle__from">All four for</span>
<strong>€21.50</strong>
<button class="btn btn--mag" type="button" data-toast="Bundle added — fictional demo">Add bundle</button>
</div>
</div>
</section>
<!-- ===== Route map ===== -->
<section class="section reveal" id="routes">
<div class="section__head">
<h2>142 airports. One yellow plane.</h2>
<p>Tap a hub to see where the cheap seats fly.</p>
</div>
<div class="routes">
<div class="routes__hubs" role="tablist" aria-label="Hubs">
<button class="hub is-active" role="tab" aria-selected="true" data-hub="BCN">Barcelona</button>
<button class="hub" role="tab" aria-selected="false" data-hub="LON">London</button>
<button class="hub" role="tab" aria-selected="false" data-hub="BER">Berlin</button>
<button class="hub" role="tab" aria-selected="false" data-hub="MAD">Madrid</button>
</div>
<div class="routes__map" aria-live="polite">
<svg class="map" viewBox="0 0 520 320" role="img" aria-label="Stylised route map">
<g id="mapLines" stroke="#000" stroke-width="2" stroke-dasharray="5 5" fill="none" opacity="0.55"></g>
<g id="mapDots"></g>
</svg>
<ul class="routes__list" id="routeList"></ul>
</div>
</div>
</section>
<!-- ===== App download ===== -->
<section class="appcta reveal" id="app">
<div class="appcta__inner">
<div class="appcta__copy">
<span class="kick kick--dark">GET THE APP</span>
<h2>Fares are cheaper in the app.</h2>
<p>Exclusive app-only drops, boarding passes on your phone & price-watch pings the second a route gets cheaper.</p>
<form class="appcta__form" id="smsForm">
<input type="tel" id="phone" placeholder="Phone number" aria-label="Phone number" />
<button class="btn btn--solid" type="submit">Text me the link</button>
</form>
<div class="appcta__stores">
<button class="store" type="button" data-toast="App Store — fictional demo">App Store</button>
<button class="store" type="button" data-toast="Google Play — fictional demo">Google Play</button>
</div>
</div>
<div class="appcta__phone" aria-hidden="true">
<div class="phone">
<div class="phone__notch"></div>
<div class="phone__screen">
<div class="phone__bp">
<div class="phone__bp-row"><b>ZP 2204</b><span class="pill pill--ok">BOARDING</span></div>
<div class="phone__bp-route"><span>BCN</span><i>✈</i><span>FCO</span></div>
<div class="phone__bp-grid">
<div><small>Gate</small><b>B12</b></div>
<div><small>Seat</small><b>14C</b></div>
<div><small>Boards</small><b>09:40</b></div>
</div>
<div class="phone__bp-perf"></div>
<div class="phone__bp-bar"></div>
</div>
</div>
</div>
</div>
</div>
</section>
</main>
<!-- ===== Footer ===== -->
<footer class="footer">
<div class="footer__grid">
<div class="footer__brand">
<span class="brand__name">ZIPPA<i>AIR</i></span>
<p>Cheap seats, big smiles. Flying 142 airports across Europe since 2019.</p>
</div>
<div class="footer__col">
<h4>Book</h4>
<a href="#deals">Deals</a><a href="#routes">Routes</a><a href="#">Group travel</a><a href="#">Gift cards</a>
</div>
<div class="footer__col">
<h4>Help</h4>
<a href="#">Check-in</a><a href="#">Baggage</a><a href="#">Refunds</a><a href="#">Contact</a>
</div>
<div class="footer__col">
<h4>Company</h4>
<a href="#">Careers</a><a href="#">Press</a><a href="#">Sustainability</a><a href="#">Legal</a>
</div>
</div>
<div class="footer__bar">
<span>© 2026 Zippa Air (fictional). All fares illustrative.</span>
<span class="footer__pay">Visa · Mastercard · PayPal</span>
</div>
</footer>
<div class="toast" id="toast" role="status" aria-live="polite"></div>
<script src="script.js"></script>
</body>
</html>Low-Cost Carrier Landing
A full marketing landing page for Zippa Air, a fictional budget airline, leaning into the loud, energetic aesthetic of value carriers: a high-contrast yellow, black and magenta palette, heavy display type, hard offset shadows and a scrolling fare ticker pinned to the top. The hero combines a one-way fare search (origin, destination, swap button, date and travellers) with a dark price callout card whose fare and progress bar wobble live while a seats-left counter ticks down to nudge urgency.
Below the fold, a responsive deals grid renders eight discounted routes from data, each showing the airport pair, destination city, taxes-in price, the crossed-out original fare and a percentage-off tag. An add-ons section explains the pay-only-for-what-you-need model with cards for bags, seats, speedy boarding and snacks, plus a bundle upsell. An interactive SVG route map lets you switch between four hubs, animating dashed flight paths and a matching list of fares, and an app-download block pairs an SMS sign-up form with a boarding-pass phone mockup.
Everything runs on vanilla JavaScript: a reusable toast() helper for feedback, a sticky nav that shrinks on scroll, a slide-in mobile drawer, the live fare and seats tickers, data-driven deals and route rendering, and IntersectionObserver scroll reveals. It is responsive down to ~360px, keyboard-operable and respects prefers-reduced-motion.
Illustrative UI only — fictional airline, not a real booking or flight system.