feat: CTAO brand redesign (official tokens, Inter+Space Grotesk, logo), spec-based nav/footer, EN UI, card covers + featured lead, mock badges, Sveltia logo; remove fake demo articles
This commit is contained in:
+126
-90
@@ -1,60 +1,57 @@
|
||||
/* ==========================================================================
|
||||
CTAO Portal — flat design, "Cherenkov blue" accent.
|
||||
All look-and-feel lives in the tokens below: change a color/font/radius
|
||||
here and the whole site follows. Light is canonical; dark mode overrides
|
||||
only the tokens. All pairings meet WCAG AA contrast.
|
||||
CTAO Science Portal — design tokens per the official CTAO Brand Guidelines
|
||||
(April 2024): colors D.2, typography D.3 (Inter body / Space Grotesk display),
|
||||
flash D.4. All look-and-feel lives in the tokens below; WCAG 2.1 AA contrast.
|
||||
Light theme only (brand is light-first; navy bands carry the dark identity).
|
||||
========================================================================== */
|
||||
:root {
|
||||
--bg: #ffffff;
|
||||
--surface: #f4f6fa;
|
||||
--text: #131c2b;
|
||||
/* Brand palette — hex values straight from the brand book */
|
||||
--galaxy: #00004a; /* Galaxy Blue — headings, header/footer bands */
|
||||
--cherenkov: #00e4d8; /* Cherenkov Blue — accents, flash, CTAs; NOT for small text on light */
|
||||
--moon: #f5f5f5; /* Moon Gray — surfaces */
|
||||
--azure: #007aff; /* Cosmic Azure — brand hyperlink hue (large/UI only on light) */
|
||||
--indigo: #00009c; /* Interestellar Indigo — gradient depth */
|
||||
/* Derived, WCAG-adjusted */
|
||||
--text: #101228; /* near-Galaxy body ink */
|
||||
--muted: #46536a;
|
||||
--border: #dfe4ec;
|
||||
--accent: #1d4ed8; /* Cherenkov blue — links, buttons, active states */
|
||||
--accent-strong: #14369b; /* hover / chip text */
|
||||
--accent-soft: #edf2fe; /* chip & hint backgrounds */
|
||||
--border: #e2e5ee;
|
||||
--link: #0057c2; /* Cosmic Azure darkened to pass AA (4.5:1) for body links */
|
||||
--on-galaxy-muted: #c7cde9;
|
||||
--tint-cherenkov: rgba(0, 228, 216, 0.16); /* chip/badge fill derived from --cherenkov */
|
||||
/* Type & layout */
|
||||
--font-body: "Inter", Arial, system-ui, sans-serif; /* BRAND D.3.1 */
|
||||
--font-display: "Space Grotesk", var(--font-body); /* BRAND D.3.2 — headlines only */
|
||||
--radius: 10px;
|
||||
--maxw: 1080px;
|
||||
--font: "Sora", system-ui, sans-serif;
|
||||
}
|
||||
@media (prefers-color-scheme: dark) {
|
||||
:root {
|
||||
--bg: #101419;
|
||||
--surface: #161c24;
|
||||
--text: #e7ebf2;
|
||||
--muted: #9aa5b8;
|
||||
--border: #2a3340;
|
||||
--accent: #8ab4f8;
|
||||
--accent-strong: #b3ccfa;
|
||||
--accent-soft: #1a2637;
|
||||
}
|
||||
--maxw: 1120px;
|
||||
}
|
||||
|
||||
* { box-sizing: border-box; }
|
||||
html { -webkit-text-size-adjust: 100%; }
|
||||
body {
|
||||
margin: 0;
|
||||
font-family: var(--font);
|
||||
background: var(--bg);
|
||||
font-family: var(--font-body);
|
||||
background: #fff;
|
||||
color: var(--text);
|
||||
line-height: 1.65;
|
||||
min-height: 100dvh;
|
||||
}
|
||||
|
||||
a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
|
||||
a:hover { color: var(--accent-strong); }
|
||||
h1, h2 { font-family: var(--font-display); letter-spacing: -0.01em; }
|
||||
|
||||
a { color: var(--link); text-decoration: underline; text-underline-offset: 3px; }
|
||||
a:hover { color: var(--indigo); }
|
||||
img { max-width: 100%; height: auto; display: block; }
|
||||
|
||||
/* Visible keyboard focus everywhere (WCAG 2.4.7) */
|
||||
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
|
||||
:focus-visible { outline: 2px solid var(--azure); outline-offset: 2px; }
|
||||
|
||||
/* Skip link — first tab stop, hidden until focused (WCAG 2.4.1) */
|
||||
.skip {
|
||||
position: absolute; left: 16px; top: -48px; z-index: 20;
|
||||
background: var(--accent); color: var(--bg); text-decoration: none;
|
||||
position: absolute; left: 16px; top: -52px; z-index: 20;
|
||||
background: var(--galaxy); color: #fff; text-decoration: none;
|
||||
padding: 10px 16px; border-radius: 0 0 var(--radius) var(--radius);
|
||||
}
|
||||
.skip:focus { top: 0; color: var(--bg); }
|
||||
.skip:focus { top: 0; }
|
||||
|
||||
@media (prefers-reduced-motion: reduce) {
|
||||
*, *::before, *::after { transition: none !important; animation: none !important; }
|
||||
@@ -62,121 +59,160 @@ img { max-width: 100%; height: auto; display: block; }
|
||||
|
||||
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
|
||||
|
||||
/* Header / nav */
|
||||
.site-header { background: var(--bg); border-bottom: 1px solid var(--border); }
|
||||
.nav { display: flex; align-items: center; gap: 6px; min-height: 60px; flex-wrap: wrap; }
|
||||
.brand {
|
||||
display: flex; align-items: center; gap: 10px;
|
||||
font-weight: 700; letter-spacing: 0.01em; color: var(--text); text-decoration: none;
|
||||
/* Flash — the 4-point star brand asset (BRAND D.4), CSS-only approximation */
|
||||
.flash {
|
||||
display: inline-block; width: 14px; height: 14px; background: var(--cherenkov);
|
||||
clip-path: polygon(50% 0, 60% 40%, 100% 50%, 60% 60%, 50% 100%, 40% 60%, 0 50%, 40% 40%);
|
||||
}
|
||||
/* Flat triangle — the Cherenkov light cone */
|
||||
.brand .dot {
|
||||
width: 13px; height: 12px; background: var(--accent);
|
||||
clip-path: polygon(50% 0, 100% 100%, 0 100%);
|
||||
|
||||
/* Header — Galaxy Blue band, reverse (white) logo per BRAND B.1.2 */
|
||||
.site-header { background: var(--galaxy); }
|
||||
.nav { display: flex; align-items: center; gap: 4px; min-height: 64px; flex-wrap: wrap; }
|
||||
.brand { display: flex; align-items: center; gap: 10px; margin-right: 10px; }
|
||||
.brand img { height: 26px; width: auto; }
|
||||
.brand .brand-sub {
|
||||
color: var(--cherenkov); font-size: 0.78rem; font-weight: 500;
|
||||
border-left: 1px solid rgba(255,255,255,0.25); padding-left: 10px;
|
||||
}
|
||||
.nav .spacer { flex: 1; }
|
||||
.nav a.navlink {
|
||||
color: var(--muted); font-weight: 500; font-size: 0.95rem;
|
||||
color: var(--on-galaxy-muted); font-weight: 500; font-size: 0.95rem;
|
||||
padding: 10px 10px; text-decoration: none; border-bottom: 2px solid transparent;
|
||||
}
|
||||
.nav a.navlink:hover { color: var(--text); }
|
||||
.nav a.navlink[aria-current="page"] { color: var(--text); border-bottom-color: var(--accent); }
|
||||
.nav a.navlink:hover { color: #fff; }
|
||||
.nav a.navlink[aria-current="page"] { color: #fff; border-bottom-color: var(--cherenkov); }
|
||||
.nav a.navlink--edit {
|
||||
color: var(--accent); border: 1px solid var(--border); border-radius: var(--radius);
|
||||
color: #fff; border: 1px solid rgba(255,255,255,0.35); border-radius: var(--radius);
|
||||
padding: 7px 14px; margin-left: 6px;
|
||||
}
|
||||
.nav a.navlink--edit:hover { border-color: var(--accent); }
|
||||
.nav a.navlink--edit:hover { border-color: var(--cherenkov); color: var(--cherenkov); }
|
||||
/* AAI login placeholder — visibly disabled (mock) */
|
||||
.nav .login-mock {
|
||||
color: var(--galaxy); background: var(--cherenkov); font: inherit; font-weight: 600;
|
||||
border: 0; border-radius: var(--radius); padding: 8px 16px; margin-left: 6px; cursor: not-allowed;
|
||||
}
|
||||
.external::after { content: " ↗"; font-size: 0.85em; }
|
||||
|
||||
/* Hero */
|
||||
.hero { padding: 56px 0 24px; }
|
||||
.hero h1 {
|
||||
font-size: clamp(1.9rem, 5vw, 2.8rem); margin: 0 0 12px;
|
||||
line-height: 1.12; letter-spacing: -0.02em; font-weight: 700;
|
||||
/* Hero — navy band with a subtle nebula gradient (BRAND D.5) */
|
||||
.hero-band {
|
||||
background:
|
||||
radial-gradient(700px 340px at 85% 115%, rgba(0,228,216,0.28), transparent 65%),
|
||||
radial-gradient(500px 260px at -5% -40%, rgba(0,0,156,0.55), transparent 60%),
|
||||
var(--galaxy);
|
||||
color: #fff; padding: 56px 0 48px; position: relative; overflow: hidden;
|
||||
}
|
||||
/* Flat editorial signature: accent bar under the page title */
|
||||
.hero h1::after {
|
||||
content: ""; display: block; width: 56px; height: 4px;
|
||||
background: var(--accent); margin-top: 18px;
|
||||
}
|
||||
.hero p { color: var(--muted); font-size: 1.06rem; max-width: 60ch; margin: 0; }
|
||||
.hero-band .flash { position: absolute; right: 8%; top: 22%; width: 22px; height: 22px; }
|
||||
.hero h1 { font-size: clamp(1.9rem, 5vw, 2.9rem); margin: 0 0 10px; line-height: 1.12; font-weight: 700; }
|
||||
.hero p { color: var(--cherenkov); font-size: 1.08rem; max-width: 62ch; margin: 0; } /* subtitle per BRAND D.3.4 */
|
||||
.eyebrow {
|
||||
color: var(--accent); font-weight: 600; text-transform: uppercase;
|
||||
letter-spacing: 0.14em; font-size: 0.72rem; margin-bottom: 6px;
|
||||
color: var(--on-galaxy-muted); font-weight: 600; text-transform: uppercase;
|
||||
letter-spacing: 0.14em; font-size: 0.72rem; margin-bottom: 8px;
|
||||
}
|
||||
|
||||
/* Section headings on light background */
|
||||
.section-title { color: var(--galaxy); font-size: 1.4rem; margin: 36px 0 4px; }
|
||||
|
||||
/* News grid */
|
||||
.grid { display: grid; gap: 16px; grid-template-columns: 1fr; padding: 28px 0 64px; }
|
||||
@media (min-width: 640px) { .grid { grid-template-columns: repeat(2, 1fr); } }
|
||||
@media (min-width: 940px) { .grid { grid-template-columns: repeat(3, 1fr); } }
|
||||
|
||||
/* News cards — image + category + clamped title/description + <time> meta;
|
||||
whole card clickable via stretched link (research: NN/g & card-UI guides 2025). */
|
||||
.card {
|
||||
background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius);
|
||||
padding: 22px; display: flex; flex-direction: column; gap: 10px;
|
||||
position: relative; background: #fff; border: 1px solid var(--border);
|
||||
border-radius: var(--radius); overflow: hidden;
|
||||
display: flex; flex-direction: column;
|
||||
transition: border-color 0.15s ease;
|
||||
}
|
||||
.card:hover, .card:focus-within { border-color: var(--accent); }
|
||||
.card:hover, .card:focus-within { border-color: var(--azure); }
|
||||
.card .cover { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
|
||||
.card .body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
|
||||
.card .cat {
|
||||
align-self: flex-start; font-size: 0.72rem; text-transform: uppercase;
|
||||
letter-spacing: 0.08em; font-weight: 600;
|
||||
color: var(--accent-strong); background: var(--accent-soft);
|
||||
color: var(--galaxy); background: var(--tint-cherenkov);
|
||||
padding: 4px 10px; border-radius: 999px;
|
||||
}
|
||||
.card h3 { margin: 2px 0 0; font-size: 1.12rem; line-height: 1.35; }
|
||||
.card h3 a { color: var(--text); text-decoration: none; }
|
||||
.card h3 a:hover { color: var(--accent); }
|
||||
.card p { margin: 0; color: var(--muted); font-size: 0.94rem; }
|
||||
.card h3 {
|
||||
margin: 2px 0 0; font-size: 1.1rem; line-height: 1.35; font-family: var(--font-body);
|
||||
display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
|
||||
}
|
||||
.card h3 a { color: var(--galaxy); text-decoration: none; }
|
||||
/* Stretched link: the title's tap target covers the whole card (still one tab stop) */
|
||||
.card h3 a::after { content: ""; position: absolute; inset: 0; }
|
||||
.card h3 a:hover { color: var(--link); }
|
||||
.card .desc {
|
||||
margin: 0; color: var(--muted); font-size: 0.94rem;
|
||||
display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
|
||||
}
|
||||
.card .meta { margin-top: auto; color: var(--muted); font-size: 0.8rem; }
|
||||
/* Lead story — larger, spans the grid (editorial "hot news" hierarchy) */
|
||||
@media (min-width: 940px) {
|
||||
.card--featured { grid-column: 1 / -1; display: grid; grid-template-columns: 3fr 2fr; }
|
||||
.card--featured .cover { height: 100%; aspect-ratio: auto; }
|
||||
.card--featured .body { padding: 26px 28px; justify-content: center; }
|
||||
.card--featured h3 { font-size: 1.6rem; font-family: var(--font-display); -webkit-line-clamp: 3; }
|
||||
.card--featured .desc { -webkit-line-clamp: 3; }
|
||||
}
|
||||
|
||||
/* Article */
|
||||
.article { padding: 40px 0 72px; max-width: 720px; }
|
||||
.article .back { color: var(--muted); font-size: 0.9rem; }
|
||||
.article h1 {
|
||||
font-size: clamp(1.7rem, 4.5vw, 2.4rem); margin: 14px 0 8px;
|
||||
line-height: 1.15; letter-spacing: -0.02em;
|
||||
color: var(--galaxy); font-size: clamp(1.7rem, 4.5vw, 2.4rem);
|
||||
margin: 14px 0 8px; line-height: 1.15;
|
||||
}
|
||||
.article .meta { color: var(--muted); font-size: 0.9rem; margin-bottom: 28px; }
|
||||
.article .cover { border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 28px; }
|
||||
.prose h2 { margin: 34px 0 10px; font-size: 1.45rem; letter-spacing: -0.01em; }
|
||||
.prose h3 { margin: 26px 0 8px; font-size: 1.15rem; }
|
||||
.prose h2 { color: var(--galaxy); margin: 34px 0 10px; font-size: 1.45rem; }
|
||||
.prose h3 { color: var(--galaxy); margin: 26px 0 8px; font-size: 1.15rem; }
|
||||
.prose p { margin: 0 0 16px; }
|
||||
.prose ul { margin: 0 0 16px; padding-left: 22px; }
|
||||
.prose ul, .prose ol { margin: 0 0 16px; padding-left: 22px; }
|
||||
.prose li { margin: 6px 0; }
|
||||
.prose blockquote {
|
||||
margin: 22px 0; padding: 12px 20px; border-left: 3px solid var(--accent);
|
||||
background: var(--surface); color: var(--text);
|
||||
margin: 22px 0; padding: 12px 20px; border-left: 3px solid var(--cherenkov);
|
||||
background: var(--moon); color: var(--text);
|
||||
}
|
||||
.prose ol { margin: 0 0 16px; padding-left: 22px; }
|
||||
.prose img { border: 1px solid var(--border); border-radius: var(--radius); }
|
||||
.prose img + em, .prose p > em:only-child { color: var(--muted); font-size: 0.85rem; }
|
||||
.prose hr { border: 0; border-top: 1px solid var(--border); margin: 32px 0; }
|
||||
.prose table { width: 100%; border-collapse: collapse; margin: 0 0 16px; font-size: 0.94rem; }
|
||||
.prose th { text-align: left; font-weight: 600; }
|
||||
.prose th { text-align: left; font-weight: 600; color: var(--galaxy); }
|
||||
.prose th, .prose td { padding: 10px 12px; border-bottom: 1px solid var(--border); }
|
||||
.prose thead th { border-bottom: 2px solid var(--accent); }
|
||||
.prose thead th { border-bottom: 2px solid var(--cherenkov); }
|
||||
|
||||
/* Generic page / mockup */
|
||||
.page { padding: 40px 0 72px; }
|
||||
.panel { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; }
|
||||
.panel { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; }
|
||||
.form-row { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
|
||||
.form-row label { font-size: 0.88rem; font-weight: 500; }
|
||||
.form-row input, .form-row select, .form-row textarea {
|
||||
background: var(--bg); border: 1px solid var(--border); border-radius: calc(var(--radius) - 4px);
|
||||
background: #fff; border: 1px solid var(--border); border-radius: calc(var(--radius) - 4px);
|
||||
color: var(--text); padding: 11px 12px; font: inherit;
|
||||
}
|
||||
.form-row input:focus, .form-row select:focus, .form-row textarea:focus { border-color: var(--accent); }
|
||||
.form-row input:focus, .form-row select:focus, .form-row textarea:focus { border-color: var(--azure); }
|
||||
.btn {
|
||||
background: var(--accent); color: var(--bg); border: 0;
|
||||
background: var(--cherenkov); color: var(--galaxy); border: 0;
|
||||
padding: 12px 20px; border-radius: calc(var(--radius) - 4px);
|
||||
font: inherit; font-weight: 600; cursor: pointer;
|
||||
}
|
||||
.btn:hover { background: var(--accent-strong); }
|
||||
.btn:hover { filter: brightness(0.92); }
|
||||
.notice { color: var(--muted); font-size: 0.85rem; margin-top: 10px; }
|
||||
|
||||
.placeholder { display: grid; place-items: center; min-height: 40vh; text-align: center; color: var(--muted); }
|
||||
/* Mock/status badges — every mock must be labelled (REQUIREMENTS.md §5) */
|
||||
.badge-mock, .badge-ext {
|
||||
display: inline-block; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.06em;
|
||||
text-transform: uppercase; padding: 4px 10px; border-radius: 999px; margin-bottom: 14px;
|
||||
}
|
||||
.badge-mock { color: #7a3d00; background: #fff3e0; border: 1px solid #f0cf9b; }
|
||||
.badge-ext { color: var(--galaxy); background: var(--moon); border: 1px solid var(--border); }
|
||||
|
||||
.placeholder { display: grid; place-items: center; min-height: 32vh; text-align: center; color: var(--muted); }
|
||||
.placeholder .big { font-size: 3rem; margin-bottom: 8px; }
|
||||
|
||||
.footer { border-top: 1px solid var(--border); color: var(--muted); font-size: 0.85rem; padding: 26px 0; margin-top: 24px; }
|
||||
.cms-hint {
|
||||
background: var(--accent-soft); border: 1px solid var(--border);
|
||||
border-radius: var(--radius); padding: 14px 16px; font-size: 0.9rem; margin: 0 0 24px;
|
||||
}
|
||||
/* Footer — bottom menu per SPEC §3.3.1: disclaimers, privacy, contact, settings, search */
|
||||
.footer { background: var(--galaxy); color: var(--on-galaxy-muted); font-size: 0.85rem; margin-top: 24px; }
|
||||
.footer .inner { display: flex; flex-wrap: wrap; gap: 8px 22px; align-items: center; padding: 26px 0; }
|
||||
.footer a { color: #fff; }
|
||||
.footer .note { width: 100%; margin-top: 6px; color: var(--on-galaxy-muted); }
|
||||
|
||||
Reference in New Issue
Block a user