NGU-Web/src/index.css
Zaldimmar 79f1d09eef Try the revised palette (teal, green, amber, ink)
The suggested grid as the theme defaults, light and dark, with
PALETTE, the accents (olive becomes amber), the backdrop shades
and every literal from the old grid mapped over. Every text pair
passes the admin's 4.5:1 check; the hero's filled button is amber.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-30 16:51:14 -05:00

414 lines
12 KiB
CSS

@import '@fontsource/montserrat/400.css';
@import '@fontsource/montserrat/600.css';
@import '@fontsource/montserrat/700.css';
@import '@fontsource/poppins/400.css';
@import '@fontsource/poppins/600.css';
@import '@fontsource/poppins/700.css';
@import '@fontsource/poppins/800.css'; /* the front page's stat numbers only */
@import 'tailwindcss';
@theme {
--font-display: 'Poppins', sans-serif;
--font-body: 'Montserrat', sans-serif;
/* ── Color tokens ─────────────────────────────────────────────
Named for what they do, not what they look like, because dark
mode (below) swaps the values. Use them as utilities
(text-muted, bg-surface, border-brand/20) or, in a style prop,
as var(--color-muted). Every text color passes WCAG AA (4.5:1)
on surface, tint and tint-soft in both modes.
A color that must stay the same in both modes (white text on
a dark band, a platform's own color) stays a literal. Colors
that arrive as data (page accents, event and region colors) go
through withAlpha() and accentText() in src/lib/color.ts. */
--color-ink: #001011; /* headings */
--color-body: #003a45; /* body text */
--color-muted: #3b5456; /* secondary text, quiet borders */
--color-link: #00748a; /* links and teal text */
--color-brand: #00748a; /* decoration: borders, rings, rules */
--color-action: #00748a; /* button fills, under white text */
--color-action-hover: #003a45;
--color-surface: #f5f9f8; /* page and cards */
--color-tint: #d6f5fa; /* tinted sections and panels */
--color-tint-soft: #e8f5f6; /* hover rows, faint panels */
--color-danger: #b3261e;
--color-danger-tint: #fdf3f2;
/* Cards: a step off the page so they read as sitting on it (white
here; a touch of tint in dark mode, below). Derived rather than
an admin token, so it follows the palette. With a shadow. */
--color-raised: #ffffff;
/* Tailwind's shadows, tinted with the site's deep ink instead of
black, so a card's shadow belongs to the page. */
--shadow-2xs: 0 1px rgb(0 16 17 / 0.05);
--shadow-xs: 0 1px 2px 0 rgb(0 16 17 / 0.05);
--shadow-sm: 0 1px 3px 0 rgb(0 16 17 / 0.1), 0 1px 2px -1px rgb(0 16 17 / 0.1);
--shadow-md: 0 4px 6px -1px rgb(0 16 17 / 0.1), 0 2px 4px -2px rgb(0 16 17 / 0.1);
--shadow-lg: 0 10px 15px -3px rgb(0 16 17 / 0.12), 0 4px 6px -4px rgb(0 16 17 / 0.1);
--shadow-xl: 0 20px 25px -5px rgb(0 16 17 / 0.12), 0 8px 10px -6px rgb(0 16 17 / 0.1);
--shadow-2xl: 0 25px 50px -12px rgb(0 16 17 / 0.3);
}
/* How much of an accent color its text keeps (src/lib/color.ts,
accentText): all of it on light, half (the rest white) on dark. */
:root {
--accent-text-mix: 100%;
}
/* Dark mode: the visitor's system setting, unless the header toggle
chose (data-theme on <html>, set before first paint in index.html
and by ThemeToggle). */
@custom-variant dark (&:where([data-theme="dark"], [data-theme="dark"] *));
@layer base {
:root[data-theme="dark"] {
--color-ink: #f5f9f8;
--color-body: #d6f5fa;
--color-muted: #a3b8b9;
--color-link: #5cd3e6;
--color-brand: #00748a;
--color-action: #00748a;
--color-action-hover: #003a45;
--color-surface: #001011;
--color-tint: #003a45;
--color-tint-soft: #00222a;
--color-danger: #ff8a80;
--color-danger-tint: #3b1714;
--color-raised: color-mix(in srgb, var(--color-tint) 35%, var(--color-surface));
--accent-text-mix: 50%;
color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
:root:not([data-theme="light"]) {
--color-ink: #f5f9f8;
--color-body: #d6f5fa;
--color-muted: #a3b8b9;
--color-link: #5cd3e6;
--color-brand: #00748a;
--color-action: #00748a;
--color-action-hover: #003a45;
--color-surface: #001011;
--color-tint: #003a45;
--color-tint-soft: #00222a;
--color-danger: #ff8a80;
--color-danger-tint: #3b1714;
--color-raised: color-mix(in srgb, var(--color-tint) 35%, var(--color-surface));
--accent-text-mix: 50%;
color-scheme: dark;
}
}
}
* {
box-sizing: border-box;
}
html {
scroll-behavior: smooth;
}
/* One visible focus ring for keyboard users, wherever a component
doesn't draw its own. */
:focus-visible {
outline: 2px solid var(--color-link);
outline-offset: 2px;
}
/* Visitors who ask for less motion get no smooth scrolling, slides
or hover zooms. */
@media (prefers-reduced-motion: reduce) {
html {
scroll-behavior: auto;
}
*,
*::before,
*::after {
animation-duration: 0.01ms !important;
animation-iteration-count: 1 !important;
transition-duration: 0.01ms !important;
}
}
body {
font-family: 'Montserrat', sans-serif;
background-color: var(--color-surface);
color: var(--color-ink);
-webkit-font-smoothing: antialiased;
}
/* Type: Poppins Bold for titles, headings and buttons (the btn
utility), Poppins at regular weight for subheadings, Montserrat
for everything else. */
h1, h2, h3, h4, h5, h6 {
font-family: 'Poppins', sans-serif;
font-weight: bold;
}
/* A logo on a dark page: many are drawn for white paper (dark marks,
transparent background) and would vanish. .logo-plate gives them
a small light backing in dark mode only. */
:root[data-theme="dark"] .logo-plate {
background: #f5f9f8;
padding: 0.25rem;
}
@media (prefers-color-scheme: dark) {
:root:not([data-theme="light"]) .logo-plate {
background: #f5f9f8;
padding: 0.25rem;
}
}
/* Printing (a blog post's Download PDF, or any page): the light
palette whatever the screen shows, since paper is white and dark
mode's pale text would barely print; and backgrounds kept, so the
tinted panels and table rows come out as on screen. */
@media print {
:root,
:root[data-theme="dark"] {
--color-ink: #001011;
--color-body: #003a45;
--color-muted: #3b5456;
--color-link: #00748a;
--color-brand: #00748a;
--color-surface: #f5f9f8;
--color-tint: #d6f5fa;
--color-tint-soft: #e8f5f6;
--color-danger: #b3261e;
--color-danger-tint: #fdf3f2;
--accent-text-mix: 100%;
color-scheme: light;
print-color-adjust: exact;
}
.logo-plate {
background: none !important;
padding: 0 !important;
}
}
@page {
margin: 1.5cm;
}
/* Church Center's giving modal (Giving.tsx) is a transparent iframe
over the whole page, drawn for light pages. On a dark page the
browser sees the iframe's scheme differ from ours and paints its
background opaque, so the page behind goes solid white. Telling it
the iframe is light keeps the backdrop see-through. */
iframe[src*="churchcenter"] {
color-scheme: light;
}
/* Corners, one rule for the site: none. Everything is square except
buttons (the btn utility below, or var(--btn-radius) in plain CSS)
and video players, which get a small radius, and things that are
round by nature: dots, radio marks, the play button. */
:root {
--btn-radius: 0.5rem;
}
/* A notice where content would be (an empty section, a form's
note, "coming soon"): no box and no fill, just two thick brackets
at opposite corners, top left and bottom right, like a
viewfinder. Padding stays with each use; the brackets sit in its
corners, so give it some. */
@utility notice {
position: relative;
&::before,
&::after {
content: '';
position: absolute;
width: 1.75rem;
height: 1.75rem;
border: 0 solid var(--color-brand);
pointer-events: none;
}
&::before {
top: 0;
left: 0;
border-top-width: 4px;
border-left-width: 4px;
}
&::after {
right: 0;
bottom: 0;
border-right-width: 4px;
border-bottom-width: 4px;
}
}
/* A video's play button (VideoPlayer.tsx) waits for a hover or
keyboard focus where the device can hover; on a touch screen it
always shows, since there is nothing to hover with. */
@media (hover: hover) {
.video-play:not(.video-play--always) > span {
opacity: 0;
transition: opacity 160ms ease, transform 160ms ease;
}
.group:hover .video-play > span,
.group:focus-visible .video-play > span {
opacity: 1;
}
}
/* Buttons, and links drawn as buttons: Poppins Bold, small rounded
corners. Color, size and border stay with each button. */
@utility btn {
font-family: var(--font-display);
font-weight: 700;
border-radius: var(--btn-radius);
}
/* Scrollbar hide */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: color-mix(in srgb, var(--color-brand) 40%, transparent); }
.ig-icon { fill: currentColor; transition: fill 200ms ease; }
.ig-link:hover .ig-icon { fill: var(--ig-fill); }
.footer-icons:hover .ig-icon { fill: var(--ig-fill); }
.fb-icon:hover { fill: #0862f7; }
.ds-icon:hover { fill: #5865f1; }
/* Event Card Section */
.ev-card {
container-type: inline-size;
}
.ev-grid {
display: grid;
gap: 0.25rem 1.5rem;
grid-template-columns: 2fr 1fr;
grid-template-areas:
"org image"
"info image"
"desc desc";
}
.ev-org {
grid-area: org;
}
.ev-info {
grid-area: info;
}
.ev-image {
grid-area: image;
justify-self: stretch;
align-self: center;
max-height: 11rem;
}
.ev-desc {
grid-area: desc;
margin-top: 1rem;
}
@container (max-width: 30rem) {
.ev-grid {
grid-template-columns: 1fr;
grid-template-areas:
"org"
"info"
"desc";
}
.ev-grid .ev-image {
justify-self: start;
width: auto;
max-height: 7rem;
margin-bottom: 0.5rem;
}
}
/* ═══════════════════════════════════════════════════════════════
SKELETON
Holds roughly a card's height so the page doesn't jump when the
data arrives. The shimmer is decoration, so it goes away for
anyone who has asked for less motion.
═══════════════════════════════════════════════════════════════ */
.skeleton {
min-height: 22rem;
background: linear-gradient(
100deg,
color-mix(in srgb, var(--color-muted) 8%, transparent) 30%,
color-mix(in srgb, var(--color-muted) 16%, transparent) 50%,
color-mix(in srgb, var(--color-muted) 8%, transparent) 70%
);
background-size: 200% 100%;
animation: skeleton-shimmer 1.4s ease-in-out infinite;
}
@keyframes skeleton-shimmer {
from {
background-position: 200% 0;
}
to {
background-position: -200% 0;
}
}
@media (prefers-reduced-motion: reduce) {
.skeleton {
animation: none;
}
}
/* ═══════════════════════════════════════════════════════════════
UNITY REGIONS
Append to index.css. Scoped to .ur- so nothing here reaches the
rest of the site.
═══════════════════════════════════════════════════════════════ */
/* The 0fr → 1fr grid row animates to the panel's real height, so
nobody has to guess a max-height that's wrong the moment a
region's description grows. The inline style sets the value;
this sets how it moves. */
.ur-panel {
display: grid;
transition: grid-template-rows 300ms ease;
}
.ur-chevron {
transition: transform 200ms ease;
}
@media (prefers-reduced-motion: reduce) {
.ur-panel,
.ur-chevron {
transition: none;
}
}
/* ═══════════════════════════════════════════════════════════════
ORGANIZATION LIST
Append to index.css. Scoped to .ol- so nothing here reaches the
rest of the site.
═══════════════════════════════════════════════════════════════ */
/* The 0fr → 1fr grid row animates to the panel's real height, so
nobody has to guess a max-height that's wrong the moment a
description grows. The inline style sets the value; this sets
how it moves. */
.ol-panel {
display: grid;
transition: grid-template-rows 300ms ease;
}
.ol-chevron {
transition: transform 200ms ease;
}
@media (prefers-reduced-motion: reduce) {
.ol-panel,
.ol-chevron {
transition: none;
}
}